mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-10 07:15:03 -06:00
Create a component for the Views selector. This component contains the
list of the views and also the shortcuts for the camera position. The theme colors, sizes and the styles have been updated. Contributes to CURA-5784.
This commit is contained in:
parent
3acfdadd12
commit
075a9a161f
9 changed files with 235 additions and 304 deletions
|
@ -15,12 +15,11 @@
|
|||
"border": [127, 127, 127, 255],
|
||||
"secondary": [241, 242, 242, 255],
|
||||
|
||||
"topbar_background_color": [0, 0, 0, 0],
|
||||
"topbar_background_color_monitoring": [31, 36, 39, 255],
|
||||
"topheader_background": [31, 36, 39, 255],
|
||||
|
||||
"topbar_button_text_active": [255, 255, 255, 255],
|
||||
"topbar_button_text_inactive": [128, 128, 128, 255],
|
||||
"topbar_button_text_hovered": [255, 255, 255, 255],
|
||||
"topheader_button_text_active": [255, 255, 255, 255],
|
||||
"topheader_button_text_inactive": [128, 128, 128, 255],
|
||||
"topheader_button_text_hovered": [255, 255, 255, 255],
|
||||
|
||||
"text": [255, 255, 255, 204],
|
||||
"text_detail": [255, 255, 255, 172],
|
||||
|
@ -221,6 +220,10 @@
|
|||
"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]
|
||||
"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],
|
||||
"toolbox_header_button_text_hovered": [255, 255, 255, 255]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,85 +90,11 @@ QtObject {
|
|||
}
|
||||
}
|
||||
|
||||
property Component topbar_header_tab_no_overlay: Component {
|
||||
ButtonStyle {
|
||||
background: Rectangle {
|
||||
implicitHeight: Theme.getSize("topbar_button").height
|
||||
implicitWidth: Theme.getSize("topbar_button").width
|
||||
color: "transparent"
|
||||
anchors.fill: parent
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: underline
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
width: parent.width
|
||||
height: Theme.getSize("sidebar_header_highlight").height
|
||||
color: control.checked ? UM.Theme.getColor("sidebar_header_highlight") : UM.Theme.getColor("sidebar_header_highlight_hover")
|
||||
visible: control.hovered || control.checked
|
||||
}
|
||||
}
|
||||
|
||||
label: Rectangle {
|
||||
implicitHeight: Theme.getSize("topbar_button_icon").height
|
||||
implicitWidth: Theme.getSize("topbar_button").width
|
||||
color: "transparent"
|
||||
anchors.fill: parent
|
||||
|
||||
Item
|
||||
{
|
||||
anchors.centerIn: parent
|
||||
width: Math.round(textLabel.width + icon.width + Theme.getSize("default_margin").width / 2)
|
||||
Label
|
||||
{
|
||||
id: textLabel
|
||||
text: control.text
|
||||
anchors.right: icon.visible ? icon.left : parent.right
|
||||
anchors.rightMargin: icon.visible ? Math.round(Theme.getSize("default_margin").width / 2) : 0
|
||||
anchors.verticalCenter: parent.verticalCenter;
|
||||
font: control.checked ? UM.Theme.getFont("large") : UM.Theme.getFont("large_nonbold")
|
||||
color:
|
||||
{
|
||||
if(control.hovered)
|
||||
{
|
||||
return UM.Theme.getColor("topbar_button_text_hovered");
|
||||
}
|
||||
if(control.checked)
|
||||
{
|
||||
return UM.Theme.getColor("topbar_button_text_active");
|
||||
}
|
||||
else
|
||||
{
|
||||
return UM.Theme.getColor("topbar_button_text_inactive");
|
||||
}
|
||||
}
|
||||
}
|
||||
Image
|
||||
{
|
||||
id: icon
|
||||
visible: control.iconSource != ""
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
opacity: !control.enabled ? 0.2 : 1.0
|
||||
source: control.iconSource
|
||||
width: visible ? Theme.getSize("topbar_button_icon").width : 0
|
||||
height: Theme.getSize("topbar_button_icon").height
|
||||
|
||||
sourceSize: Theme.getSize("topbar_button_icon")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
property Component topbar_header_tab: Component {
|
||||
property Component topheader_tab: Component {
|
||||
ButtonStyle {
|
||||
background: Item {
|
||||
implicitHeight: Theme.getSize("topbar_button").height
|
||||
implicitWidth: Theme.getSize("topbar_button").width + Theme.getSize("topbar_button_icon").width
|
||||
implicitHeight: Theme.getSize("topheader_button").height
|
||||
implicitWidth: Theme.getSize("topheader_button").width + Theme.getSize("topheader_button_icon").width
|
||||
|
||||
Rectangle {
|
||||
id: buttonFace;
|
||||
|
@ -182,7 +108,7 @@ QtObject {
|
|||
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.bottom: parent.bottom
|
||||
width: Theme.getSize("topbar_button").width + Theme.getSize("topbar_button_icon").width
|
||||
width: Theme.getSize("topheader_button").width + Theme.getSize("topheader_button_icon").width
|
||||
height: Theme.getSize("sidebar_header_highlight").height
|
||||
color: control.checked ? UM.Theme.getColor("sidebar_header_highlight") : UM.Theme.getColor("sidebar_header_highlight_hover")
|
||||
visible: control.hovered || control.checked
|
||||
|
@ -192,14 +118,14 @@ QtObject {
|
|||
|
||||
label: Item
|
||||
{
|
||||
implicitHeight: Theme.getSize("topbar_button_icon").height
|
||||
implicitWidth: Theme.getSize("topbar_button").width + Theme.getSize("topbar_button_icon").width
|
||||
implicitHeight: Theme.getSize("topheader_button_icon").height
|
||||
implicitWidth: Theme.getSize("topheader_button").width + Theme.getSize("topheader_button_icon").width
|
||||
Item
|
||||
{
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter;
|
||||
width: childrenRect.width
|
||||
height: Theme.getSize("topbar_button_icon").height
|
||||
height: Theme.getSize("topheader_button_icon").height
|
||||
Label
|
||||
{
|
||||
id: button_label
|
||||
|
@ -210,15 +136,15 @@ QtObject {
|
|||
{
|
||||
if(control.hovered)
|
||||
{
|
||||
return UM.Theme.getColor("topbar_button_text_hovered");
|
||||
return UM.Theme.getColor("topheader_button_text_hovered");
|
||||
}
|
||||
if(control.checked)
|
||||
{
|
||||
return UM.Theme.getColor("topbar_button_text_active");
|
||||
return UM.Theme.getColor("topheader_button_text_active");
|
||||
}
|
||||
else
|
||||
{
|
||||
return UM.Theme.getColor("topbar_button_text_inactive");
|
||||
return UM.Theme.getColor("topheader_button_text_inactive");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -231,10 +157,10 @@ QtObject {
|
|||
color: UM.Theme.getColor("text_emphasis")
|
||||
opacity: !control.enabled ? 0.2 : 1.0
|
||||
source: control.iconSource
|
||||
width: visible ? Theme.getSize("topbar_button_icon").width : 0
|
||||
height: Theme.getSize("topbar_button_icon").height
|
||||
width: visible ? Theme.getSize("topheader_button_icon").width : 0
|
||||
height: Theme.getSize("topheader_button_icon").height
|
||||
|
||||
sourceSize: Theme.getSize("topbar_button_icon")
|
||||
sourceSize: Theme.getSize("topheader_button_icon")
|
||||
}
|
||||
UM.RecolorImage
|
||||
{
|
||||
|
@ -245,10 +171,10 @@ QtObject {
|
|||
color: control.overlayColor
|
||||
opacity: !control.enabled ? 0.2 : 1.0
|
||||
source: control.overlayIconSource
|
||||
width: visible ? Theme.getSize("topbar_button_icon").width : 0
|
||||
height: Theme.getSize("topbar_button_icon").height
|
||||
width: visible ? Theme.getSize("topheader_button_icon").width : 0
|
||||
height: Theme.getSize("topheader_button_icon").height
|
||||
|
||||
sourceSize: Theme.getSize("topbar_button_icon")
|
||||
sourceSize: Theme.getSize("topheader_button_icon")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,12 +79,11 @@
|
|||
"border": [127, 127, 127, 255],
|
||||
"secondary": [245, 245, 245, 255],
|
||||
|
||||
"topbar_background_color": [255, 255, 255, 0],
|
||||
"topbar_background_color_monitoring": [255, 255, 255, 255],
|
||||
"topheader_background": [255, 255, 255, 255],
|
||||
|
||||
"topbar_button_text_active": [0, 0, 0, 255],
|
||||
"topbar_button_text_inactive": [128, 128, 128, 255],
|
||||
"topbar_button_text_hovered": [0, 0, 0, 255],
|
||||
"topheader_button_text_active": [0, 0, 0, 255],
|
||||
"topheader_button_text_inactive": [128, 128, 128, 255],
|
||||
"topheader_button_text_hovered": [0, 0, 0, 255],
|
||||
|
||||
"text": [0, 0, 0, 255],
|
||||
"text_detail": [174, 174, 174, 128],
|
||||
|
@ -317,6 +316,10 @@
|
|||
"printer_config_matched": [12, 169, 227, 255],
|
||||
"printer_config_mismatch": [127, 127, 127, 255],
|
||||
|
||||
"toolbox_header_button_text_active": [0, 0, 0, 255],
|
||||
"toolbox_header_button_text_inactive": [128, 128, 128, 255],
|
||||
"toolbox_header_button_text_hovered": [0, 0, 0, 255],
|
||||
|
||||
"favorites_header_bar": [245, 245, 245, 255],
|
||||
"favorites_header_hover": [245, 245, 245, 255],
|
||||
"favorites_header_text": [31, 36, 39, 255],
|
||||
|
@ -332,6 +335,13 @@
|
|||
"sizes": {
|
||||
"window_minimum_size": [70, 50],
|
||||
|
||||
"topheader": [0.0, 4.0],
|
||||
"topheader_logo_right_margin": [3, 0],
|
||||
"topheader_button": [8, 4],
|
||||
"topheader_button_icon": [1.2, 1.2],
|
||||
|
||||
"views_selector": [0.0, 4.0],
|
||||
|
||||
"default_lining": [0.08, 0.08],
|
||||
"default_arrow": [0.8, 0.8],
|
||||
"logo": [7.6, 1.6],
|
||||
|
@ -390,10 +400,6 @@
|
|||
"printer_status_icon": [1.8, 1.8],
|
||||
"printer_sync_icon": [1.2, 1.2],
|
||||
|
||||
"topbar_logo_right_margin": [3, 0],
|
||||
"topbar_button": [8, 4],
|
||||
"topbar_button_icon": [1.2, 1.2],
|
||||
|
||||
"button_tooltip": [1.0, 1.3],
|
||||
"button_tooltip_arrow": [0.25, 0.25],
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue