15.10 Restyling of the message stack

specifically the progressbar, styling of the messages and colors

Contributes to: issue CURA-60
This commit is contained in:
Tamara Hogenhout 2015-08-21 10:54:39 +02:00
parent 0ea042a140
commit 720577ff8e
4 changed files with 23 additions and 23 deletions

View File

@ -116,6 +116,11 @@ class CuraApplication(QtApplication):
def run(self): def run(self):
self._i18n_catalog = i18nCatalog("cura"); self._i18n_catalog = i18nCatalog("cura");
i18nCatalog.setTagReplacements({
"filename": "font color=\"black\"",
"message": "font color=UM.Theme.colors.message_text;",
})
self.showSplashMessage(self._i18n_catalog.i18nc("Splash screen message", "Setting up scene...")) self.showSplashMessage(self._i18n_catalog.i18nc("Splash screen message", "Setting up scene..."))
controller = self.getController() controller = self.getController()

View File

@ -214,6 +214,7 @@ UM.MainWindow {
anchors { anchors {
horizontalCenter: parent.horizontalCenter horizontalCenter: parent.horizontalCenter
horizontalCenterOffset: -(UM.Theme.sizes.logo.width/ 2) horizontalCenterOffset: -(UM.Theme.sizes.logo.width/ 2)
top: parent.verticalCenter;
bottom: parent.bottom; bottom: parent.bottom;
} }
} }

View File

@ -43,13 +43,7 @@ QtObject {
Rectangle { Rectangle {
width: parent.width width: parent.width
height: parent.height height: parent.height
color: { color: control.hovered ? UM.Theme.colors.load_save_button_hover : UM.Theme.colors.load_save_button
if(control.hovered) {
return UM.Theme.colors.load_save_button_hover
} else {
return UM.Theme.colors.load_save_button
}
}
Behavior on color { ColorAnimation { duration: 50; } } Behavior on color { ColorAnimation { duration: 50; } }
} }
Label { Label {
@ -208,30 +202,29 @@ QtObject {
property Component progressbar: Component{ property Component progressbar: Component{
ProgressBarStyle { ProgressBarStyle {
background: UM.AngledCornerRectangle { background:Rectangle {
cornerSize: UM.Theme.sizes.progressbar_control.height implicitWidth: UM.Theme.sizes.message.width - (UM.Theme.sizes.default_margin.width * 2)
implicitWidth: UM.Theme.sizes.progressbar.width
implicitHeight: UM.Theme.sizes.progressbar.height implicitHeight: UM.Theme.sizes.progressbar.height
x: UM.Theme.sizes.default_margin.width
color: UM.Theme.colors.progressbar_background color: UM.Theme.colors.progressbar_background
} }
progress: UM.AngledCornerRectangle { progress: Rectangle {
cornerSize: UM.Theme.sizes.progressbar_control.height
color: control.indeterminate ? "transparent" : UM.Theme.colors.progressbar_control color: control.indeterminate ? "transparent" : UM.Theme.colors.progressbar_control
UM.AngledCornerRectangle { Rectangle{
cornerSize: UM.Theme.sizes.progressbar_control.height
color: UM.Theme.colors.progressbar_control color: UM.Theme.colors.progressbar_control
width: UM.Theme.sizes.progressbar_control.width width: UM.Theme.sizes.progressbar_control.width
height: UM.Theme.sizes.progressbar_control.height height: UM.Theme.sizes.progressbar_control.height
x: UM.Theme.sizes.default_margin.width
visible: control.indeterminate visible: control.indeterminate
SequentialAnimation on x { SequentialAnimation on x {
id: xAnim id: xAnim
property int animEndPoint: UM.Theme.sizes.progressbar.width - UM.Theme.sizes.progressbar_control.width property int animEndPoint: UM.Theme.sizes.message.width - UM.Theme.sizes.default_margin.width - UM.Theme.sizes.progressbar_control.width
running: control.indeterminate running: control.indeterminate
loops: Animation.Infinite loops: Animation.Infinite
NumberAnimation { from: 0; to: xAnim.animEndPoint; duration: 2000;} NumberAnimation { from: UM.Theme.sizes.default_margin.width; to: xAnim.animEndPoint; duration: 2000;}
NumberAnimation { from: xAnim.animEndPoint; to: 0; duration: 2000;} NumberAnimation { from: xAnim.animEndPoint; to: UM.Theme.sizes.default_margin.width; duration: 2000;}
} }
} }
} }

View File

@ -103,7 +103,7 @@
"setting_validation_warning": [255, 186, 15, 255], "setting_validation_warning": [255, 186, 15, 255],
"setting_validation_ok": [255, 255, 255, 255], "setting_validation_ok": [255, 255, 255, 255],
"progressbar_background": [245, 245, 245, 255], "progressbar_background": [208, 210, 211, 255],
"progressbar_control": [12, 169, 227, 255], "progressbar_control": [12, 169, 227, 255],
"slider_groove": [245, 245, 245, 255], "slider_groove": [245, 245, 245, 255],
@ -131,8 +131,8 @@
"save_button_printtime_text": [12, 169, 227, 255], "save_button_printtime_text": [12, 169, 227, 255],
"save_button_background": [249, 249, 249, 255], "save_button_background": [249, 249, 249, 255],
"message": [160, 163, 171, 255], "message_background": [255, 255, 255, 255],
"message_text": [35, 35, 35, 255], "message_text": [12, 169, 227, 255],
"tool_panel_background": [255, 255, 255, 255] "tool_panel_background": [255, 255, 255, 255]
}, },
@ -165,8 +165,8 @@
"button": [3.2, 3.2], "button": [3.2, 3.2],
"button_icon": [2.5, 2.5], "button_icon": [2.5, 2.5],
"progressbar": [26.0, 0.5], "progressbar": [26.0, 0.8],
"progressbar_control": [8.0, 0.5], "progressbar_control": [8.0, 0.8],
"progressbar_padding": [0.0, 1.0], "progressbar_padding": [0.0, 1.0],
"scrollbar": [0.5, 0.5], "scrollbar": [0.5, 0.5],
@ -193,6 +193,7 @@
"wizard_progress": [10.0, 0.0], "wizard_progress": [10.0, 0.0],
"message": [30.0, 5.0], "message": [30.0, 5.0],
"message_close": [1.25, 1.25] "message_close": [1.25, 1.25],
"message_button": [6.0, 1.8]
} }
} }