Cleanup the Theme.json

There were a lot of sizes that weren't used
This commit is contained in:
Jaime van Kessel 2018-11-26 17:10:48 +01:00
parent d1a5d548a9
commit a825daea95
4 changed files with 0 additions and 273 deletions

View file

@ -298,7 +298,6 @@ UM.Dialog
id: machineName
text: getMachineName()
width: Math.floor(parent.width * 0.75)
implicitWidth: UM.Theme.getSize("standard_list_input").width
maximumLength: 40
//validator: Cura.MachineNameValidator { } //TODO: Gives a segfault in PyQt5.6. For now, we must use a signal on text changed.
validator: RegExpValidator

View file

@ -133,7 +133,6 @@
"slider_groove_border": [127, 127, 127, 255],
"slider_groove_fill": [245, 245, 245, 255],
"slider_handle": [255, 255, 255, 255],
"slider_handle_hover": [77, 182, 226, 255],
"slider_handle_active": [68, 192, 255, 255],
"slider_text_background": [255, 255, 255, 255],
@ -209,9 +208,6 @@
"quality_slider_unavailable": [179, 179, 179, 255],
"quality_slider_available": [255, 255, 255, 255],
"quality_slider_handle": [255, 255, 255, 255],
"quality_slider_handle_hover": [127, 127, 127, 255],
"quality_slider_text": [255, 255, 255, 255],
"toolbox_header_button_text_active": [255, 255, 255, 255],
"toolbox_header_button_text_inactive": [128, 128, 128, 255],

View file

@ -599,198 +599,6 @@ QtObject
}
}
property Component sidebar_category: Component
{
ButtonStyle
{
background: Rectangle
{
anchors.fill: parent
anchors.left: parent.left
anchors.leftMargin: Theme.getSize("thick_margin").width
anchors.right: parent.right
anchors.rightMargin: Theme.getSize("thick_margin").width
implicitHeight: Theme.getSize("section").height
color:
{
if(control.color)
{
return control.color;
}
else if(!control.enabled)
{
return Theme.getColor("setting_category_disabled");
}
else if(control.hovered && control.checkable && control.checked)
{
return Theme.getColor("setting_category_active_hover");
}
else if(control.pressed || (control.checkable && control.checked))
{
return Theme.getColor("setting_category_active");
}
else if(control.hovered)
{
return Theme.getColor("setting_category_hover");
}
else
{
return Theme.getColor("setting_category");
}
}
Behavior on color { ColorAnimation { duration: 50; } }
Rectangle
{
height: Theme.getSize("default_lining").height
width: parent.width
anchors.bottom: parent.bottom
color:
{
if(!control.enabled)
{
return Theme.getColor("setting_category_disabled_border");
}
else if((control.hovered || control.activeFocus) && control.checkable && control.checked)
{
return Theme.getColor("setting_category_active_hover_border");
}
else if(control.pressed || (control.checkable && control.checked))
{
return Theme.getColor("setting_category_active_border");
}
else if(control.hovered || control.activeFocus)
{
return Theme.getColor("setting_category_hover_border");
}
else
{
return Theme.getColor("setting_category_border");
}
}
}
}
label: Item
{
anchors.fill: parent
anchors.left: parent.left
Item
{
id: icon
anchors.left: parent.left
height: parent.height
width: Theme.getSize("section_icon_column").width
UM.RecolorImage
{
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: Theme.getSize("thick_margin").width
color:
{
if(!control.enabled)
{
return Theme.getColor("setting_category_disabled_text");
}
else if((control.hovered || control.activeFocus) && control.checkable && control.checked)
{
return Theme.getColor("setting_category_active_hover_text");
}
else if(control.pressed || (control.checkable && control.checked))
{
return Theme.getColor("setting_category_active_text");
}
else if(control.hovered || control.activeFocus)
{
return Theme.getColor("setting_category_hover_text");
}
else
{
return Theme.getColor("setting_category_text");
}
}
source: control.iconSource;
width: Theme.getSize("section_icon").width;
height: Theme.getSize("section_icon").height;
sourceSize.width: width + 15 * screenScaleFactor
sourceSize.height: width + 15 * screenScaleFactor
}
}
Label
{
anchors
{
left: icon.right
leftMargin: Theme.getSize("default_margin").width
right: parent.right
verticalCenter: parent.verticalCenter
}
text: control.text
font: Theme.getFont("setting_category")
color:
{
if(!control.enabled)
{
return Theme.getColor("setting_category_disabled_text");
}
else if((control.hovered || control.activeFocus) && control.checkable && control.checked)
{
return Theme.getColor("setting_category_active_hover_text");
}
else if(control.pressed || (control.checkable && control.checked))
{
return Theme.getColor("setting_category_active_text");
}
else if(control.hovered || control.activeFocus)
{
return Theme.getColor("setting_category_hover_text");
}
else
{
return Theme.getColor("setting_category_text");
}
}
fontSizeMode: Text.HorizontalFit
minimumPointSize: 8
}
UM.RecolorImage
{
id: category_arrow
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: Theme.getSize("default_margin").width * 3 - Math.round(width / 2)
width: Theme.getSize("standard_arrow").width
height: Theme.getSize("standard_arrow").height
sourceSize.width: width
sourceSize.height: width
color:
{
if(!control.enabled)
{
return Theme.getColor("setting_category_disabled_text");
}
else if((control.hovered || control.activeFocus) && control.checkable && control.checked)
{
return Theme.getColor("setting_category_active_hover_text");
}
else if(control.pressed || (control.checkable && control.checked))
{
return Theme.getColor("setting_category_active_text");
}
else if(control.hovered || control.activeFocus)
{
return Theme.getColor("setting_category_hover_text");
}
else
{
return Theme.getColor("setting_category_text");
}
}
source: control.checked ? Theme.getIcon("arrow_bottom") : Theme.getIcon("arrow_left")
}
}
}
}
property Component scrollview: Component
{
ScrollViewStyle
@ -1144,60 +952,4 @@ QtObject
label: Item { }
}
}
property Component toolbox_action_button: Component
{
ButtonStyle
{
background: Rectangle
{
implicitWidth: UM.Theme.getSize("toolbox_action_button").width
implicitHeight: UM.Theme.getSize("toolbox_action_button").height
color:
{
if (control.installed)
{
return UM.Theme.getColor("action_button_disabled");
}
else
{
if (control.hovered)
{
return UM.Theme.getColor("primary_hover");
}
else
{
return UM.Theme.getColor("primary");
}
}
}
}
label: Label
{
text: control.text
color:
{
if (control.installed)
{
return UM.Theme.getColor("action_button_disabled_text");
}
else
{
if (control.hovered)
{
return UM.Theme.getColor("button_text_hover");
}
else
{
return UM.Theme.getColor("button_text");
}
}
}
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
font: UM.Theme.getFont("default_bold")
}
}
}
}

View file

@ -122,7 +122,6 @@
"text_detail": [174, 174, 174, 128],
"text_link": [50, 130, 255, 255],
"text_inactive": [174, 174, 174, 255],
"text_hover": [70, 84, 113, 255],
"text_pressed": [50, 130, 255, 255],
"text_subtext": [0, 0, 0, 255],
"text_medium": [128, 128, 128, 255],
@ -228,15 +227,11 @@
"slider_groove": [223, 223, 223, 255],
"slider_groove_fill": [10, 8, 80, 255],
"slider_handle": [10, 8, 80, 255],
"slider_handle_hover": [77, 182, 226, 255],
"slider_handle_active": [50, 130, 255, 255],
"slider_text_background": [255, 255, 255, 255],
"quality_slider_unavailable": [179, 179, 179, 255],
"quality_slider_available": [0, 0, 0, 255],
"quality_slider_handle": [0, 0, 0, 255],
"quality_slider_handle_hover": [127, 127, 127, 255],
"quality_slider_text": [0, 0, 0, 255],
"checkbox": [255, 255, 255, 255],
"checkbox_hover": [255, 255, 255, 255],
@ -245,15 +240,6 @@
"checkbox_mark": [119, 122, 124, 255],
"checkbox_text": [27, 27, 27, 255],
"mode_switch": [255, 255, 255, 255],
"mode_switch_hover": [255, 255, 255, 255],
"mode_switch_border": [127, 127, 127, 255],
"mode_switch_border_hover": [50, 130, 255, 255],
"mode_switch_handle": [31, 36, 39, 255],
"mode_switch_text": [31, 36, 39, 255],
"mode_switch_text_hover": [31, 36, 39, 255],
"mode_switch_text_checked": [50, 130, 255, 255],
"tooltip": [68, 192, 255, 255],
"tooltip_text": [255, 255, 255, 255],
@ -384,7 +370,6 @@
"print_setup_item": [0.0, 2.0],
"print_setup_extruder_box": [0.0, 6.0],
"configuration_selector_widget": [35.0, 4.5],
"configuration_selector_mode_tabs": [0.0, 3.0],
"action_panel_widget": [25.0, 0.0],
@ -412,9 +397,6 @@
"extruder_icon": [1.8, 1.8],
"simple_mode_infill_caption": [0.0, 5.0],
"simple_mode_infill_height": [0.0, 8.0],
"section": [0.0, 2.2],
"section_icon": [1.6, 1.6],
"section_icon_column": [2.8, 0.0],
@ -428,7 +410,6 @@
"setting_text_maxwidth": [40.0, 0.0],
"standard_list_lineheight": [1.5, 1.5],
"standard_list_input": [20.0, 25.0],
"standard_arrow": [0.8, 0.8],
"button": [4, 4],
@ -482,7 +463,6 @@
"modal_window_minimum": [60.0, 45],
"license_window_minimum": [45, 45],
"wizard_progress": [10.0, 0.0],
"message": [30.0, 5.0],
"message_close": [1, 1],