mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 14:44:13 -06:00
Change the TopHeader name to MainWindowHeader, since there is nothing
more on the top than the header. Contributes to CURA-5784.
This commit is contained in:
parent
6f12197cea
commit
15b35da612
9 changed files with 43 additions and 45 deletions
|
@ -13,8 +13,8 @@ Button
|
||||||
property var profile: Cura.API.account.userProfile
|
property var profile: Cura.API.account.userProfile
|
||||||
property var loggedIn: Cura.API.account.isLoggedIn
|
property var loggedIn: Cura.API.account.isLoggedIn
|
||||||
|
|
||||||
implicitHeight: UM.Theme.getSize("topheader").height
|
implicitHeight: UM.Theme.getSize("main_window_header").height
|
||||||
implicitWidth: UM.Theme.getSize("topheader").height
|
implicitWidth: UM.Theme.getSize("main_window_header").height
|
||||||
|
|
||||||
AvatarImage
|
AvatarImage
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,8 +18,8 @@ Row
|
||||||
text: catalog.i18nc("@button", "Create account")
|
text: catalog.i18nc("@button", "Create account")
|
||||||
color: UM.Theme.getColor("secondary")
|
color: UM.Theme.getColor("secondary")
|
||||||
hoverColor: UM.Theme.getColor("secondary")
|
hoverColor: UM.Theme.getColor("secondary")
|
||||||
textColor: UM.Theme.getColor("text_link")
|
textColor: UM.Theme.getColor("main_window_header_button_text_active")
|
||||||
textHoverColor: UM.Theme.getColor("text")
|
textHoverColor: UM.Theme.getColor("main_window_header_button_text_active")
|
||||||
onClicked: Qt.openUrlExternally("https://account.ultimaker.com")
|
onClicked: Qt.openUrlExternally("https://account.ultimaker.com")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@ Row
|
||||||
text: catalog.i18nc("@button", "Manage account")
|
text: catalog.i18nc("@button", "Manage account")
|
||||||
color: UM.Theme.getColor("secondary")
|
color: UM.Theme.getColor("secondary")
|
||||||
hoverColor: UM.Theme.getColor("secondary")
|
hoverColor: UM.Theme.getColor("secondary")
|
||||||
textColor: UM.Theme.getColor("text_link")
|
textColor: UM.Theme.getColor("main_window_header_button_text_active")
|
||||||
textHoverColor: UM.Theme.getColor("text")
|
textHoverColor: UM.Theme.getColor("main_window_header_button_text_active")
|
||||||
onClicked: Qt.openUrlExternally("https://account.ultimaker.com")
|
onClicked: Qt.openUrlExternally("https://account.ultimaker.com")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,9 +86,9 @@ UM.MainWindow
|
||||||
window: base
|
window: base
|
||||||
}
|
}
|
||||||
|
|
||||||
TopHeader
|
MainWindowHeader
|
||||||
{
|
{
|
||||||
id: topHeader
|
id: mainWindowHeader
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
left: parent.left
|
left: parent.left
|
||||||
|
@ -103,7 +103,7 @@ UM.MainWindow
|
||||||
|
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
top: topHeader.bottom
|
top: mainWindowHeader.bottom
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
|
@ -152,7 +152,7 @@ UM.MainWindow
|
||||||
}
|
}
|
||||||
visible: stageMenu.source != ""
|
visible: stageMenu.source != ""
|
||||||
height: Math.round(UM.Theme.getSize("stage_menu").height / 2)
|
height: Math.round(UM.Theme.getSize("stage_menu").height / 2)
|
||||||
color: UM.Theme.getColor("topheader_background")
|
color: UM.Theme.getColor("main_window_header_background")
|
||||||
}
|
}
|
||||||
|
|
||||||
Loader
|
Loader
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Cura is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.1
|
import QtQuick.Controls 1.4
|
||||||
import QtQuick.Controls.Styles 1.1
|
import QtQuick.Controls.Styles 1.1
|
||||||
|
|
||||||
import UM 1.4 as UM
|
import UM 1.4 as UM
|
||||||
|
@ -14,9 +14,9 @@ Rectangle
|
||||||
{
|
{
|
||||||
id: base
|
id: base
|
||||||
|
|
||||||
implicitHeight: UM.Theme.getSize("topheader").height
|
implicitHeight: UM.Theme.getSize("main_window_header").height
|
||||||
implicitWidth: UM.Theme.getSize("topheader").width
|
implicitWidth: UM.Theme.getSize("main_window_header").width
|
||||||
color: UM.Theme.getColor("topheader_background")
|
color: UM.Theme.getColor("main_window_header_background")
|
||||||
|
|
||||||
Image
|
Image
|
||||||
{
|
{
|
||||||
|
@ -43,7 +43,7 @@ Rectangle
|
||||||
leftMargin: UM.Theme.getSize("default_margin").width
|
leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
}
|
}
|
||||||
|
|
||||||
// The topheader is dynamically filled with all available stages
|
// The main window header is dynamically filled with all available stages
|
||||||
Repeater
|
Repeater
|
||||||
{
|
{
|
||||||
id: stagesHeader
|
id: stagesHeader
|
||||||
|
@ -55,9 +55,9 @@ Rectangle
|
||||||
text: model.name.toUpperCase()
|
text: model.name.toUpperCase()
|
||||||
checkable: true
|
checkable: true
|
||||||
checked: model.active
|
checked: model.active
|
||||||
exclusiveGroup: topheaderMenuGroup
|
exclusiveGroup: mainWindowHeaderMenuGroup
|
||||||
style: UM.Theme.styles.topheader_tab
|
style: UM.Theme.styles.main_window_header_tab
|
||||||
height: UM.Theme.getSize("topheader").height
|
height: UM.Theme.getSize("main_window_header").height
|
||||||
onClicked: UM.Controller.setActiveStage(model.id)
|
onClicked: UM.Controller.setActiveStage(model.id)
|
||||||
iconSource: model.stage.iconSource
|
iconSource: model.stage.iconSource
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ Rectangle
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ExclusiveGroup { id: topheaderMenuGroup }
|
ExclusiveGroup { id: mainWindowHeaderMenuGroup }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shortcut button to quick access the Toolbox
|
// Shortcut button to quick access the Toolbox
|
||||||
|
@ -83,14 +83,14 @@ Rectangle
|
||||||
{
|
{
|
||||||
background: Rectangle
|
background: Rectangle
|
||||||
{
|
{
|
||||||
color: control.hovered ? UM.Theme.getColor("secondary") : UM.Theme.getColor("topheader_button_background_active")
|
color: control.hovered ? UM.Theme.getColor("secondary") : UM.Theme.getColor("main_window_header_button_background_active")
|
||||||
radius: 2 * screenScaleFactor
|
radius: 2 * screenScaleFactor
|
||||||
}
|
}
|
||||||
|
|
||||||
label: Label
|
label: Label
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@action:button", "Toolbox")
|
text: catalog.i18nc("@action:button", "Toolbox")
|
||||||
color: UM.Theme.getColor("topheader_button_text_active")
|
color: UM.Theme.getColor("main_window_header_button_text_active")
|
||||||
font: UM.Theme.getFont("action_button")
|
font: UM.Theme.getFont("action_button")
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
}
|
}
|
|
@ -77,8 +77,8 @@ Rectangle
|
||||||
UM.RecolorImage {
|
UM.RecolorImage {
|
||||||
id: buildplateIcon
|
id: buildplateIcon
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
width: UM.Theme.getSize("topheader_button_icon").width
|
width: UM.Theme.getSize("main_window_header_button_icon").width
|
||||||
height: UM.Theme.getSize("topheader_button_icon").height
|
height: UM.Theme.getSize("main_window_header_button_icon").height
|
||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
sourceSize.height: height
|
sourceSize.height: height
|
||||||
source: UM.Theme.getIcon("buildplate")
|
source: UM.Theme.getIcon("buildplate")
|
||||||
|
|
|
@ -15,11 +15,10 @@
|
||||||
"border": [127, 127, 127, 255],
|
"border": [127, 127, 127, 255],
|
||||||
"secondary": [241, 242, 242, 255],
|
"secondary": [241, 242, 242, 255],
|
||||||
|
|
||||||
"topheader_background": [31, 36, 39, 255],
|
"main_window_header_background": [31, 36, 39, 255],
|
||||||
|
"main_window_header_button_text_active": [31, 36, 39, 255],
|
||||||
"topheader_button_text_active": [31, 36, 39, 255],
|
"main_window_header_button_text_inactive": [128, 128, 128, 255],
|
||||||
"topheader_button_text_inactive": [128, 128, 128, 255],
|
"main_window_header_button_text_hovered": [255, 255, 255, 255],
|
||||||
"topheader_button_text_hovered": [255, 255, 255, 255],
|
|
||||||
|
|
||||||
"text": [255, 255, 255, 204],
|
"text": [255, 255, 255, 204],
|
||||||
"text_detail": [255, 255, 255, 172],
|
"text_detail": [255, 255, 255, 172],
|
||||||
|
|
|
@ -96,7 +96,7 @@ QtObject
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
property Component topheader_tab: Component
|
property Component main_window_header_tab: Component
|
||||||
{
|
{
|
||||||
ButtonStyle
|
ButtonStyle
|
||||||
{
|
{
|
||||||
|
@ -114,7 +114,7 @@ QtObject
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
implicitHeight: parent.height - 2 * UM.Theme.getSize("default_margin").width
|
implicitHeight: parent.height - 2 * UM.Theme.getSize("default_margin").width
|
||||||
implicitWidth: UM.Theme.getSize("default_lining").width
|
implicitWidth: UM.Theme.getSize("default_lining").width
|
||||||
color: UM.Theme.getColor("topheader_button_background_active")
|
color: UM.Theme.getColor("main_window_header_button_background_active")
|
||||||
visible: !control.checked
|
visible: !control.checked
|
||||||
}
|
}
|
||||||
Rectangle
|
Rectangle
|
||||||
|
@ -122,7 +122,7 @@ QtObject
|
||||||
id: buttonFace
|
id: buttonFace
|
||||||
implicitHeight: parent.height
|
implicitHeight: parent.height
|
||||||
implicitWidth: parent.width
|
implicitWidth: parent.width
|
||||||
color: control.checked ? UM.Theme.getColor("topheader_button_background_active") : UM.Theme.getColor("topheader_button_background_inactive")
|
color: control.checked ? UM.Theme.getColor("main_window_header_button_background_active") : UM.Theme.getColor("main_window_header_button_background_inactive")
|
||||||
|
|
||||||
Behavior on color { ColorAnimation { duration: 50 } }
|
Behavior on color { ColorAnimation { duration: 50 } }
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,7 @@ QtObject
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
implicitHeight: parent.height - 2 * UM.Theme.getSize("default_margin").width
|
implicitHeight: parent.height - 2 * UM.Theme.getSize("default_margin").width
|
||||||
implicitWidth: UM.Theme.getSize("default_lining").width
|
implicitWidth: UM.Theme.getSize("default_lining").width
|
||||||
color: UM.Theme.getColor("topheader_button_background_active")
|
color: UM.Theme.getColor("main_window_header_button_background_active")
|
||||||
visible: !control.checked
|
visible: !control.checked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -156,15 +156,15 @@ QtObject
|
||||||
{
|
{
|
||||||
if (control.checked)
|
if (control.checked)
|
||||||
{
|
{
|
||||||
return UM.Theme.getColor("topheader_button_text_active");
|
return UM.Theme.getColor("main_window_header_button_text_active");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (control.hovered)
|
if (control.hovered)
|
||||||
{
|
{
|
||||||
return UM.Theme.getColor("topheader_button_text_hovered");
|
return UM.Theme.getColor("main_window_header_button_text_hovered");
|
||||||
}
|
}
|
||||||
return UM.Theme.getColor("topheader_button_text_inactive");
|
return UM.Theme.getColor("main_window_header_button_text_inactive");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,13 +79,12 @@
|
||||||
"border": [127, 127, 127, 255],
|
"border": [127, 127, 127, 255],
|
||||||
"secondary": [245, 245, 245, 255],
|
"secondary": [245, 245, 245, 255],
|
||||||
|
|
||||||
"topheader_background": [12, 169, 227, 255],
|
"main_window_header_background": [12, 169, 227, 255],
|
||||||
|
"main_window_header_button_text_active": [12, 169, 227, 255],
|
||||||
"topheader_button_text_active": [12, 169, 227, 255],
|
"main_window_header_button_text_inactive": [255, 255, 255, 255],
|
||||||
"topheader_button_text_inactive": [255, 255, 255, 255],
|
"main_window_header_button_text_hovered": [0, 0, 0, 255],
|
||||||
"topheader_button_text_hovered": [0, 0, 0, 255],
|
"main_window_header_button_background_active": [255, 255, 255, 255],
|
||||||
"topheader_button_background_active": [255, 255, 255, 255],
|
"main_window_header_button_background_inactive": [255, 255, 255, 0],
|
||||||
"topheader_button_background_inactive": [255, 255, 255, 0],
|
|
||||||
|
|
||||||
"account_widget_outline_active": [9, 140, 188, 255],
|
"account_widget_outline_active": [9, 140, 188, 255],
|
||||||
"account_widget_outline_inactive": [229, 229, 229, 255],
|
"account_widget_outline_inactive": [229, 229, 229, 255],
|
||||||
|
@ -340,9 +339,9 @@
|
||||||
"sizes": {
|
"sizes": {
|
||||||
"window_minimum_size": [70, 50],
|
"window_minimum_size": [70, 50],
|
||||||
|
|
||||||
"topheader": [0.0, 4.5],
|
"main_window_header": [0.0, 4.5],
|
||||||
"topheader_button": [8, 4],
|
"main_window_header_button": [8, 4],
|
||||||
"topheader_button_icon": [1.2, 1.2],
|
"main_window_header_button_icon": [1.2, 1.2],
|
||||||
|
|
||||||
"stage_menu": [0.0, 4.5],
|
"stage_menu": [0.0, 4.5],
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue