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:
Diego Prado Gesto 2018-10-19 16:40:21 +02:00
parent 6f12197cea
commit 15b35da612
9 changed files with 43 additions and 45 deletions

View file

@ -13,8 +13,8 @@ Button
property var profile: Cura.API.account.userProfile
property var loggedIn: Cura.API.account.isLoggedIn
implicitHeight: UM.Theme.getSize("topheader").height
implicitWidth: UM.Theme.getSize("topheader").height
implicitHeight: UM.Theme.getSize("main_window_header").height
implicitWidth: UM.Theme.getSize("main_window_header").height
AvatarImage
{

View file

@ -18,8 +18,8 @@ Row
text: catalog.i18nc("@button", "Create account")
color: UM.Theme.getColor("secondary")
hoverColor: UM.Theme.getColor("secondary")
textColor: UM.Theme.getColor("text_link")
textHoverColor: UM.Theme.getColor("text")
textColor: UM.Theme.getColor("main_window_header_button_text_active")
textHoverColor: UM.Theme.getColor("main_window_header_button_text_active")
onClicked: Qt.openUrlExternally("https://account.ultimaker.com")
}

View file

@ -18,8 +18,8 @@ Row
text: catalog.i18nc("@button", "Manage account")
color: UM.Theme.getColor("secondary")
hoverColor: UM.Theme.getColor("secondary")
textColor: UM.Theme.getColor("text_link")
textHoverColor: UM.Theme.getColor("text")
textColor: UM.Theme.getColor("main_window_header_button_text_active")
textHoverColor: UM.Theme.getColor("main_window_header_button_text_active")
onClicked: Qt.openUrlExternally("https://account.ultimaker.com")
}

View file

@ -86,9 +86,9 @@ UM.MainWindow
window: base
}
TopHeader
MainWindowHeader
{
id: topHeader
id: mainWindowHeader
anchors
{
left: parent.left
@ -103,7 +103,7 @@ UM.MainWindow
anchors
{
top: topHeader.bottom
top: mainWindowHeader.bottom
bottom: parent.bottom
left: parent.left
right: parent.right
@ -152,7 +152,7 @@ UM.MainWindow
}
visible: stageMenu.source != ""
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

View file

@ -2,7 +2,7 @@
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7
import QtQuick.Controls 1.1
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.1
import UM 1.4 as UM
@ -14,9 +14,9 @@ Rectangle
{
id: base
implicitHeight: UM.Theme.getSize("topheader").height
implicitWidth: UM.Theme.getSize("topheader").width
color: UM.Theme.getColor("topheader_background")
implicitHeight: UM.Theme.getSize("main_window_header").height
implicitWidth: UM.Theme.getSize("main_window_header").width
color: UM.Theme.getColor("main_window_header_background")
Image
{
@ -43,7 +43,7 @@ Rectangle
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
{
id: stagesHeader
@ -55,9 +55,9 @@ Rectangle
text: model.name.toUpperCase()
checkable: true
checked: model.active
exclusiveGroup: topheaderMenuGroup
style: UM.Theme.styles.topheader_tab
height: UM.Theme.getSize("topheader").height
exclusiveGroup: mainWindowHeaderMenuGroup
style: UM.Theme.styles.main_window_header_tab
height: UM.Theme.getSize("main_window_header").height
onClicked: UM.Controller.setActiveStage(model.id)
iconSource: model.stage.iconSource
@ -66,7 +66,7 @@ Rectangle
}
}
ExclusiveGroup { id: topheaderMenuGroup }
ExclusiveGroup { id: mainWindowHeaderMenuGroup }
}
// Shortcut button to quick access the Toolbox
@ -83,14 +83,14 @@ 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
}
label: Label
{
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")
renderType: Text.NativeRendering
}

View file

@ -77,8 +77,8 @@ Rectangle
UM.RecolorImage {
id: buildplateIcon
anchors.left: parent.left
width: UM.Theme.getSize("topheader_button_icon").width
height: UM.Theme.getSize("topheader_button_icon").height
width: UM.Theme.getSize("main_window_header_button_icon").width
height: UM.Theme.getSize("main_window_header_button_icon").height
sourceSize.width: width
sourceSize.height: height
source: UM.Theme.getIcon("buildplate")

View file

@ -15,11 +15,10 @@
"border": [127, 127, 127, 255],
"secondary": [241, 242, 242, 255],
"topheader_background": [31, 36, 39, 255],
"topheader_button_text_active": [31, 36, 39, 255],
"topheader_button_text_inactive": [128, 128, 128, 255],
"topheader_button_text_hovered": [255, 255, 255, 255],
"main_window_header_background": [31, 36, 39, 255],
"main_window_header_button_text_active": [31, 36, 39, 255],
"main_window_header_button_text_inactive": [128, 128, 128, 255],
"main_window_header_button_text_hovered": [255, 255, 255, 255],
"text": [255, 255, 255, 204],
"text_detail": [255, 255, 255, 172],

View file

@ -96,7 +96,7 @@ QtObject
}
}
property Component topheader_tab: Component
property Component main_window_header_tab: Component
{
ButtonStyle
{
@ -114,7 +114,7 @@ QtObject
anchors.verticalCenter: parent.verticalCenter
implicitHeight: parent.height - 2 * UM.Theme.getSize("default_margin").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
}
Rectangle
@ -122,7 +122,7 @@ QtObject
id: buttonFace
implicitHeight: parent.height
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 } }
}
@ -132,7 +132,7 @@ QtObject
anchors.verticalCenter: parent.verticalCenter
implicitHeight: parent.height - 2 * UM.Theme.getSize("default_margin").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
}
}
@ -156,15 +156,15 @@ QtObject
{
if (control.checked)
{
return UM.Theme.getColor("topheader_button_text_active");
return UM.Theme.getColor("main_window_header_button_text_active");
}
else
{
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");
}
}
}

View file

@ -79,13 +79,12 @@
"border": [127, 127, 127, 255],
"secondary": [245, 245, 245, 255],
"topheader_background": [12, 169, 227, 255],
"topheader_button_text_active": [12, 169, 227, 255],
"topheader_button_text_inactive": [255, 255, 255, 255],
"topheader_button_text_hovered": [0, 0, 0, 255],
"topheader_button_background_active": [255, 255, 255, 255],
"topheader_button_background_inactive": [255, 255, 255, 0],
"main_window_header_background": [12, 169, 227, 255],
"main_window_header_button_text_active": [12, 169, 227, 255],
"main_window_header_button_text_inactive": [255, 255, 255, 255],
"main_window_header_button_text_hovered": [0, 0, 0, 255],
"main_window_header_button_background_active": [255, 255, 255, 255],
"main_window_header_button_background_inactive": [255, 255, 255, 0],
"account_widget_outline_active": [9, 140, 188, 255],
"account_widget_outline_inactive": [229, 229, 229, 255],
@ -340,9 +339,9 @@
"sizes": {
"window_minimum_size": [70, 50],
"topheader": [0.0, 4.5],
"topheader_button": [8, 4],
"topheader_button_icon": [1.2, 1.2],
"main_window_header": [0.0, 4.5],
"main_window_header_button": [8, 4],
"main_window_header_button_icon": [1.2, 1.2],
"stage_menu": [0.0, 4.5],