=== modified file 'components.api'
--- components.api 2016-01-21 14:42:35 +0000
+++ components.api 2016-01-27 16:42:56 +0000
@@ -852,10 +852,11 @@
property PaletteValues normal
property PaletteValues selected
Ubuntu.Components.Themes.Palette 1.3: QtObject
- property PaletteValues inactive
+ property PaletteValues disabled
+ property PaletteValues highlighted
property PaletteValues normal
property PaletteValues selected
- property PaletteValues selectedInactive
+ property PaletteValues selectedDisabled
Ubuntu.Components.Themes.PaletteValues 0.1: QtObject
property color background
property color backgroundText
@@ -879,6 +880,8 @@
property color baseText
property color field
property color fieldText
+ property color focus
+ property color focusText
property color foreground
property color foregroundText
property color negative
=== modified file 'examples/ubuntu-ui-toolkit-gallery/ListItemLayouts.qml'
--- examples/ubuntu-ui-toolkit-gallery/ListItemLayouts.qml 2015-11-10 11:53:53 +0000
+++ examples/ubuntu-ui-toolkit-gallery/ListItemLayouts.qml 2016-01-27 16:42:56 +0000
@@ -79,6 +79,7 @@
id: telegramContactsLayout
title.text: "Telegram Name goes here"
subtitle.text: "last seen 12:02"
+ summary.text: "Oh wow! What a nice layout!"
Rectangle {
id: imageShape
=== modified file 'src/Ubuntu/Components/1.3/OptionSelector.qml'
--- src/Ubuntu/Components/1.3/OptionSelector.qml 2015-09-28 14:36:54 +0000
+++ src/Ubuntu/Components/1.3/OptionSelector.qml 2016-01-27 16:42:56 +0000
@@ -216,7 +216,7 @@
readonly property url chevron: __styleInstance.chevron
readonly property url tick: __styleInstance.tick
- readonly property color themeColour: theme.palette.selected.fieldText
+ readonly property color themeColour: theme.palette.normal.backgroundText
readonly property alias colourImage: optionSelector.colourImage
property bool currentlyExpanded: expanded || multiSelection
@@ -264,6 +264,7 @@
ListView {
id: list
+ parent: listContainer.__styleInstance.content
property int previousIndex: -1
readonly property alias expanded: optionSelector.expanded
=== modified file 'src/Ubuntu/Components/1.3/PageHeadConfiguration.qml'
--- src/Ubuntu/Components/1.3/PageHeadConfiguration.qml 2015-10-01 12:54:32 +0000
+++ src/Ubuntu/Components/1.3/PageHeadConfiguration.qml 2016-01-27 16:42:56 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Canonical Ltd.
+ * Copyright 2016 Canonical Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -50,7 +50,7 @@
PageHeadSections {
id: headSections
}
- property color foregroundColor: theme.palette.selected.backgroundText
+ property color foregroundColor: theme.palette.normal.backgroundText
property bool locked: false
=== modified file 'src/Ubuntu/Components/1.3/TextField.qml'
--- src/Ubuntu/Components/1.3/TextField.qml 2016-01-26 09:56:34 +0000
+++ src/Ubuntu/Components/1.3/TextField.qml 2016-01-27 16:42:56 +0000
@@ -982,7 +982,7 @@
}
// hint is shown till user types something in the field
visible: (editor.text == "") && !editor.inputMethodComposing
- color: theme.palette.normal.base
+ color: theme.palette.normal.baseText
font: editor.font
elide: Text.ElideRight
}
=== modified file 'src/Ubuntu/Components/1.3/UbuntuColors.qml'
--- src/Ubuntu/Components/1.3/UbuntuColors.qml 2016-01-13 16:07:58 +0000
+++ src/Ubuntu/Components/1.3/UbuntuColors.qml 2016-01-27 16:42:56 +0000
@@ -1,5 +1,5 @@
/*
- Copyright 2014 Canonical Ltd.
+ Copyright 2016 Canonical Ltd.
*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -177,5 +177,5 @@
Jet. Recommended for content coloring.
\since Ubuntu.Components 1.3
*/
- readonly property color jet: "#292929"
+ readonly property color jet: "#111111"
}
=== modified file 'src/Ubuntu/Components/ListItems/1.3/Empty.qml'
--- src/Ubuntu/Components/ListItems/1.3/Empty.qml 2015-09-21 14:44:13 +0000
+++ src/Ubuntu/Components/ListItems/1.3/Empty.qml 2016-01-27 16:42:56 +0000
@@ -277,6 +277,8 @@
}
}
+ // exposed for OptionSelector
+ property alias __highlight: highlight
Rectangle {
id: highlight
@@ -291,7 +293,7 @@
top: parent.top
}
height: emptyListItem.height - bottomDividerLine.height
- color: theme.palette.selected.background
+ color: theme.palette.highlighted.background
}
ThinDivider {
=== modified file 'src/Ubuntu/Components/ListItems/1.3/LabelVisual.qml'
--- src/Ubuntu/Components/ListItems/1.3/LabelVisual.qml 2016-01-14 15:10:44 +0000
+++ src/Ubuntu/Components/ListItems/1.3/LabelVisual.qml 2016-01-27 16:42:56 +0000
@@ -32,11 +32,11 @@
elide: Text.ElideRight
color: selected
- ? UbuntuColors.orange
+ ? theme.palette.selected.backgroundText
: (secondary
? (overlay
- ? theme.palette.normal.overlayText
- : theme.palette.normal.backgroundText)
+ ? theme.palette.normal.overlaySecondaryText
+ : theme.palette.normal.backgroundSecondaryText)
: (overlay
? theme.palette.normal.overlayText
: theme.palette.normal.backgroundText))
=== modified file 'src/Ubuntu/Components/ListItems/1.3/Standard.qml'
--- src/Ubuntu/Components/ListItems/1.3/Standard.qml 2015-12-21 19:43:34 +0000
+++ src/Ubuntu/Components/ListItems/1.3/Standard.qml 2016-01-27 16:42:56 +0000
@@ -172,7 +172,7 @@
bottom: parent.bottom
left: parent.left
}
- color: theme.palette.selected.background
+ color: theme.palette.highlighted.background
}
Rectangle {
@@ -185,7 +185,7 @@
bottom: parent.bottom
right: parent.right
}
- color: theme.palette.selected.background
+ color: theme.palette.highlighted.background
}
IconVisual {
=== modified file 'src/Ubuntu/Components/Popups/1.3/Dialog.qml'
--- src/Ubuntu/Components/Popups/1.3/Dialog.qml 2016-01-13 16:07:58 +0000
+++ src/Ubuntu/Components/Popups/1.3/Dialog.qml 2016-01-27 16:42:56 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Canonical Ltd.
+ * Copyright 2016 Canonical Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -194,14 +194,14 @@
maximumLineCount: 2
elide: Text.ElideRight
textSize: Label.Large
- color: UbuntuColors.slate
+ color: theme.palette.normal.overlayText
visible: (text !== "")
}
Label {
horizontalAlignment: Text.AlignHCenter
text: dialog.text
- color: UbuntuColors.slate
+ color: theme.palette.normal.overlayText
wrapMode: Text.Wrap
visible: (text !== "")
}
=== modified file 'src/Ubuntu/Components/Themes/1.3/Palette.qml'
--- src/Ubuntu/Components/Themes/1.3/Palette.qml 2015-11-30 10:05:54 +0000
+++ src/Ubuntu/Components/Themes/1.3/Palette.qml 2016-01-27 16:42:56 +0000
@@ -53,9 +53,11 @@
property PaletteValues normal: PaletteValues{}
/*!
- Color palette to use when the widget is in the inactive (disabled) state.
+ Color palette to use when the widget is in the disabled (enabled: false)
+ state.
+ \since Ubuntu.Components.Themes 1.3
*/
- property PaletteValues inactive: PaletteValues{}
+ property PaletteValues disabled: PaletteValues{}
/*!
Color palette to use when the widget is selected, for example when
@@ -64,8 +66,14 @@
property PaletteValues selected: PaletteValues{}
/*!
- Color palette values to use when the widget is selected and inactive.
+ Color palette to use when the widget is selected and disabled.
+ \since Ubuntu.Components.Themes 1.3
+ */
+ property PaletteValues selectedDisabled: PaletteValues{}
+
+ /*!
+ Color palette values to use when the widget is highlighted.
\since Ubuntu.Components.Themes 1.3
*/
- property PaletteValues selectedInactive: PaletteValues{}
+ property PaletteValues highlighted: PaletteValues{}
}
=== modified file 'src/Ubuntu/Components/Themes/1.3/PaletteValues.qml'
--- src/Ubuntu/Components/Themes/1.3/PaletteValues.qml 2015-11-30 13:15:10 +0000
+++ src/Ubuntu/Components/Themes/1.3/PaletteValues.qml 2016-01-27 16:42:56 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright 2013 Canonical Ltd.
+ * Copyright 2016 Canonical Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -148,4 +148,15 @@
\since Ubuntu.Components.Themes 1.3
*/
property color selectionText
+
+ /*!
+ Color applied for the focus frame drawn around the active focus component
+ if it was focused using keyboard navigation.
+ */
+ property color focus
+
+ /*!
+ Color applied to elements placed on top of the \l focus color.
+ */
+ property color focusText
}
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceNormal.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceNormal.qml 2016-01-13 16:07:58 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceNormal.qml 2016-01-27 16:42:56 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Canonical Ltd.
+ * Copyright 2016 Canonical Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -24,7 +24,7 @@
backgroundSecondaryText: UbuntuColors.slate
backgroundTertiaryText: UbuntuColors.ash
base: UbuntuColors.silk
- baseText: UbuntuColors.slate
+ baseText: UbuntuColors.ash
foreground: UbuntuColors.porcelain
foregroundText: UbuntuColors.jet
raised: "#FFFFFF"
@@ -35,7 +35,9 @@
overlaySecondaryText: UbuntuColors.silk
field: "#FFFFFF"
fieldText: UbuntuColors.jet
- selection: Qt.rgba(UbuntuColors.orange.r, UbuntuColors.orange.g, UbuntuColors.orange.b, 0.2)
+ focus: UbuntuColors.orange
+ focusText: "#FFFFFF"
+ selection: Qt.rgba(UbuntuColors.blue.r, UbuntuColors.blue.g, UbuntuColors.blue.b, 0.2)
selectionText: UbuntuColors.jet
positive: UbuntuColors.green
positiveText: "#FFFFFF"
=== added file 'src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceSelected.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceSelected.qml 1970-01-01 00:00:00 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceSelected.qml 2016-01-27 16:42:56 +0000
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2016 Canonical Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+import QtQuick 2.4
+import Ubuntu.Components 1.3
+
+AmbianceNormal {
+ background: UbuntuColors.porcelain
+ backgroundText: UbuntuColors.blue
+ backgroundTertiaryText: UbuntuColors.blue
+ base: UbuntuColors.ash
+ baseText: UbuntuColors.blue
+ foreground: UbuntuColors.ash
+}
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeHintStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeHintStyle.qml 2016-01-13 17:31:54 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeHintStyle.qml 2016-01-27 16:42:56 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Canonical Ltd.
+ * Copyright 2016 Canonical Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -25,6 +25,14 @@
readonly property BottomEdgeHint hint: styledItem
+ property color backgroundColor: styledItem.enabled
+ ? theme.palette.normal.overlay
+ : theme.palette.disabled.overlay
+
+ property color foregroundColor: styledItem.enabled
+ ? theme.palette.normal.overlayText
+ : theme.palette.disabled.overlayText
+
// translate hint status into state
state: {
switch (hint.status) {
@@ -103,7 +111,7 @@
topMargin: styledItem.height
}
name: "toolkit_bottom-edge-hint"
- color: theme.palette.normal.overlayText
+ color: foregroundColor
}
Rectangle {
@@ -115,7 +123,7 @@
topMargin: styledItem.height
}
height: styledItem.height
- color: theme.palette.normal.overlay
+ color: backgroundColor
ThinDivider {
anchors.top: parent.top
}
@@ -134,13 +142,13 @@
width: height
height: units.gu(2)
anchors.verticalCenter: parent.verticalCenter
- color: theme.palette.normal.overlayText
+ color: foregroundColor
}
Label {
id: label
text: styledItem.text
textSize: Label.Medium
- color: theme.palette.normal.overlayText
+ color: foregroundColor
height: styledItem.height
anchors.verticalCenter: parent.verticalCenter
verticalAlignment: Text.AlignVCenter
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/BubbleShape.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/BubbleShape.qml 2015-12-04 09:52:05 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/BubbleShape.qml 2016-01-27 16:42:56 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Canonical Ltd.
+ * Copyright 2016 Canonical Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -28,15 +28,14 @@
/*!
The background color of the bubble.
*/
- property color color: square ? theme.palette.normal.background : theme.palette.normal.raised
+ property color color: square
+ ? theme.palette.normal.background
+ : theme.palette.normal.overlay
property point target
property string direction: "down"
property bool clipContent: false
default property alias children: content.children
- // FIXME: This should not be necessary. See
- // https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1214978
- property alias arrowSource: arrow.source
implicitWidth: units.gu(10)
implicitHeight: units.gu(8)
@@ -111,7 +110,7 @@
UbuntuShape {
anchors.fill: parent
aspect: UbuntuShape.Flat
- backgroundColor: theme.palette.normal.raised
+ backgroundColor: bubbleShape.color
source: bubbleShape.clipContent ? shapeSource : null
visible: !square
}
@@ -139,34 +138,4 @@
visible: bubbleShape.clipContent
}
}
-
- Item {
- x: target.x
- y: target.y
-
- Image {
- id: arrow
-
- visible: !square && bubbleShape.direction != "none"
-
- function directionToRotation(direction) {
- switch (direction) {
- case "up":
- return 180;
- case "left":
- return 90;
- case "right":
- return -90;
- default: // "down" or "none"
- return 0;
- }
- }
-
- x: -width / 2.0
- y: -height
- transformOrigin: Item.Bottom
- rotation: directionToRotation(bubbleShape.direction)
- source: Qt.resolvedUrl("../artwork/bubble_arrow.png")
- }
- }
}
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/CheckBoxStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/CheckBoxStyle.qml 2016-01-13 14:25:22 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/CheckBoxStyle.qml 2016-01-27 16:42:56 +0000
@@ -30,12 +30,14 @@
*/
property color uncheckedBackgroundColor: styledItem.enabled
? theme.palette.normal.foreground
- : theme.palette.inactive.foreground
+ : theme.palette.disabled.foreground
/*!
The background color when the checkbox is checked.
*/
- property color checkedBackgroundColor: styledItem.enabled ? theme.palette.normal.positive : theme.palette.inactive.raised
+ property color checkedBackgroundColor: styledItem.enabled
+ ? theme.palette.normal.positive
+ : theme.palette.disabled.raised
/*!
The image to show inside the checkbox when it is checked.
@@ -45,7 +47,9 @@
/*!
The color of the icon.
*/
- property color iconColor: styledItem.enabled ? theme.palette.normal.positiveText : theme.palette.inactive.raisedText
+ property color iconColor: styledItem.enabled
+ ? theme.palette.normal.positiveText
+ : theme.palette.disabled.raisedText
/*!
The padding between the icon and the border of the thumb.
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/DatePickerStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/DatePickerStyle.qml 2015-07-22 13:14:43 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/DatePickerStyle.qml 2016-01-27 16:42:56 +0000
@@ -32,7 +32,7 @@
/*!
Highlight color.
*/
- property color highlightColor: UbuntuColors.orange
+ property color highlightColor: theme.palette.highlight.baseText
/*!
Scale of the highlight item
*/
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/DialerStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/DialerStyle.qml 2015-04-25 07:36:13 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/DialerStyle.qml 2016-01-27 16:42:56 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright 2013 Canonical Ltd.
+ * Copyright 2016 Canonical Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -26,12 +26,14 @@
property real offset : units.gu(0.2)
+ property color dialerColor: theme.palette.normal.base
+
gradient: Gradient {
- GradientStop { position: 0.0; color: "#512F48" }
- GradientStop { position: 0.25; color: "#583048" }
- GradientStop { position: 0.5; color: "#653449" }
- GradientStop { position: 0.75; color: "#6D384A" }
- GradientStop { position: 1.0; color: "#753B4A" }
+ GradientStop { position: 0.0; color: dialerColor }
+ GradientStop { position: 0.25; color: Qt.darker(dialerColor, 1.0) }
+ GradientStop { position: 0.5; color: Qt.darker(dialerColor, 1.1) }
+ GradientStop { position: 0.75; color: Qt.darker(dialerColor, 1.2) }
+ GradientStop { position: 1.0; color: Qt.darker(dialerColor, 1.3) }
}
// draws the outter shadow/highlight
Rectangle {
@@ -79,11 +81,11 @@
antialiasing: true;
gradient: Gradient {
- GradientStop { position: 0.0; color: "#7A4C68" }
- GradientStop { position: 0.25; color: "#804563" }
- GradientStop { position: 0.5; color: "#864660" }
- GradientStop { position: 0.75; color: "#86465E" }
- GradientStop { position: 1.0; color: "#964E66" }
+ GradientStop { position: 0.0; color: dialerColor }
+ GradientStop { position: 0.25; color: Qt.darker(dialerColor, 1.0) }
+ GradientStop { position: 0.5; color: Qt.darker(dialerColor, 1.1) }
+ GradientStop { position: 0.75; color: Qt.darker(dialerColor, 1.2) }
+ GradientStop { position: 1.0; color: Qt.darker(dialerColor, 1.3) }
}
// draws the inner highlight / shadow
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/DialogForegroundStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/DialogForegroundStyle.qml 2015-07-22 13:14:43 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/DialogForegroundStyle.qml 2016-01-27 16:42:56 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright 2013 Canonical Ltd.
+ * Copyright 2016 Canonical Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -23,6 +23,6 @@
UbuntuShape {
id: background
anchors.fill: parent
- backgroundColor: "white"
+ backgroundColor: theme.palette.normal.overlay
}
}
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/FocusShape.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/FocusShape.qml 2016-01-21 15:44:40 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/FocusShape.qml 2016-01-27 16:42:56 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Canonical Ltd.
+ * Copyright 2016 Canonical Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -23,7 +23,9 @@
Frame {
anchors.fill: parent
anchors.margins: -units.gu(0.46)
- color: UbuntuColors.orange // FIXME: Use color from palette
+ color: styledItem.enabled
+ ? theme.palette.normal.focus
+ : theme.palette.disabled.focus
thickness: units.gu(0.21)
radius: units.gu(1.7)
visible: styledItem.keyNavigationFocus
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/IconButtonStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/IconButtonStyle.qml 2016-01-13 14:25:22 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/IconButtonStyle.qml 2016-01-27 16:42:56 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Canonical Ltd.
+ * Copyright 2016 Canonical Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -28,13 +28,13 @@
*/
property color foregroundColor: styledItem.enabled
? theme.palette.normal.backgroundText
- : theme.palette.inactive.backgroundText
+ : theme.palette.disabled.backgroundText
/*!
The background color of the button.
*/
property color backgroundColor: styledItem.pressed ?
- theme.palette.selected.background :
+ theme.palette.highlighted.background :
"transparent"
property real iconWidth: units.gu(2)
@@ -45,9 +45,6 @@
*/
property bool showLabel: false
- FocusShape {
- }
-
Rectangle {
id: background
color: iconButtonStyle.backgroundColor
@@ -61,6 +58,9 @@
height: iconButtonStyle.iconHeight
source: styledItem.iconSource
color: iconButtonStyle.foregroundColor
+
+ FocusShape {
+ }
}
Component {
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/ListItemStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/ListItemStyle.qml 2015-12-14 09:16:41 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/ListItemStyle.qml 2016-01-27 16:42:56 +0000
@@ -29,7 +29,8 @@
property color trailingPanelColor: theme.palette.normal.foreground
property color leadingForegroundColor: theme.palette.normal.negative
property color trailingForegroundColor: theme.palette.normal.foregroundText
-
+ property color leadingDisabledForegroundColor: theme.palette.disabled.negative
+ property color trailingDisabledForegroundColor: theme.palette.disabled.foregroundText
// anchoring
anchors {
// do not anchor fill
@@ -78,7 +79,6 @@
id: actionButton
action: modelData
enabled: action.enabled
- opacity: action.enabled ? 1.0 : 0.5
width: MathUtils.clamp(delegateLoader.item ? delegateLoader.item.width : 0, actionsRow.minItemWidth, actionsRow.maxItemWidth)
anchors {
top: parent ? parent.top : undefined
@@ -91,7 +91,7 @@
Rectangle {
anchors.fill: parent
- color: theme.palette.selected.background
+ color: theme.palette.highlighted.background
visible: pressed
}
@@ -122,7 +122,9 @@
width: units.gu(2)
height: width
name: action.iconName
- color: leading ? leadingForegroundColor : trailingForegroundColor
+ color: leading
+ ? (action.enabled ? leadingForegroundColor : leadingDisabledForegroundColor)
+ : (action.enabled ? trailingForegroundColor : trailingDisabledForegroundColor)
anchors.centerIn: parent
}
}
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/OptionSelectorStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/OptionSelectorStyle.qml 2015-10-01 19:03:20 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/OptionSelectorStyle.qml 2016-01-27 16:42:56 +0000
@@ -25,6 +25,7 @@
property url chevron: Qt.resolvedUrl("../artwork/chevron_down.png")
property url tick: Qt.resolvedUrl("../artwork/tick.png")
property bool colourComponent: true
+ property alias content: backgroundFrame
UbuntuShape {
id: background
@@ -32,7 +33,25 @@
width: styledItem.width
height: styledItem.height
radius: "medium"
-
- backgroundColor: Qt.rgba(0, 0, 0, 0.05)
+ source: shapeSource
+ }
+
+ ShaderEffectSource {
+ id: shapeSource
+ sourceItem: backgroundFrame
+ hideSource: true
+ // FIXME: visible: false prevents rendering so make it a nearly
+ // transparent 1x1 pixel instead
+ opacity: 0.01
+ width: 1
+ height: 1
+ }
+
+ Rectangle {
+ id: backgroundFrame
+ anchors.fill: parent
+ color: styledItem.enabled
+ ? theme.palette.normal.background
+ : theme.palette.disabled.background
}
}
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/OverflowPanel.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/OverflowPanel.qml 2016-01-14 15:10:44 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/OverflowPanel.qml 2016-01-27 16:42:56 +0000
@@ -37,12 +37,14 @@
/*!
The background color of the tapped item in the panel.
*/
- property color highlightColor: theme.palette.selected.background
+ property color highlightColor: theme.palette.highlighted.background
/*!
The foreground color (icon and text) of actions in the panel.
*/
- property color foregroundColor: theme.palette.normal.backgroundText
+ property color foregroundColor: styledItem.enabled
+ ? theme.palette.normal.backgroundText
+ : theme.palette.disabled.backgroundText
property bool square: true
callerMargin: -units.gu(1) + units.dp(4)
@@ -90,7 +92,6 @@
}
width: units.gu(2)
height: units.gu(2)
- opacity: action.enabled ? 1.0 : 0.5
}
Label {
@@ -107,7 +108,6 @@
elide: Text.ElideRight
text: action.text
color: overflow.foregroundColor
- opacity: action.enabled ? 1.0 : 0.5
}
// The value of showDivider is automatically set by ActionSelectionPopover.
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeadStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeadStyle.qml 2016-01-06 11:24:54 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeadStyle.qml 2016-01-27 16:42:56 +0000
@@ -66,28 +66,34 @@
\deprecated
The background color of the tapped item in the panel.
*/
- property color panelHighlightColor: theme.palette.selected.background
+ property color panelHighlightColor: theme.palette.highlighted.background
/*!
\deprecated
The foreground color (icon and text) of actions in the panel.
*/
- property color panelForegroundColor: theme.palette.selected.backgroundText
+ property color panelForegroundColor: styledItem.enabled
+ ? theme.palette.normal.backgroundText
+ : theme.palette.disabled.backgroundText
/*!
The text color of unselected sections and the section divider.
*/
- property color sectionColor: theme.palette.selected.backgroundText
+ property color sectionColor: styledItem.enabled
+ ? theme.palette.normal.backgroundText
+ : theme.palette.disabled.backgroundText
/*!
The text color of the selected section.
*/
- property color selectedSectionColor: UbuntuColors.orange
+ property color selectedSectionColor: styledItem.enabled
+ ? theme.palette.selected.backgroundText
+ : theme.palette.selectedDisabled.backgroundText
/*!
The background color of the pressed section.
*/
- property color sectionHighlightColor: theme.palette.selected.background
+ property color sectionHighlightColor: theme.palette.highlighted.background
implicitHeight: headerStyle.contentHeight + divider.height + sectionsItem.height
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/Palette.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/Palette.qml 2016-01-13 16:07:58 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/Palette.qml 2016-01-27 16:42:56 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright 2013 Canonical Ltd.
+ * Copyright 2016 Canonical Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -20,32 +20,40 @@
Palette {
normal: AmbianceNormal {}
- inactive: AmbianceNormal {
+ disabled: AmbianceNormal {
field: UbuntuColors.porcelain;
- // inactive is 30% transparent normal
+ // inactive is 30% opaque normal
Component.onCompleted: {
for (var p in normal) {
// skip objectName and all change signals
if (p == "objectName" || p == "field" || p.indexOf("Changed") > 0) continue;
- inactive[p] = Qt.rgba(normal[p].r, normal[p].g, normal[p].b, 0.3);
+ disabled[p] = Qt.rgba(normal[p].r, normal[p].g, normal[p].b, 0.3);
}
}
}
// selected differs from normal in background, base, foreground
- selected: AmbianceNormal {
- background: UbuntuColors.porcelain
- backgroundText: UbuntuColors.blue
- base: UbuntuColors.ash
- baseText: UbuntuColors.blue
- foreground: UbuntuColors.silk
- foregroundText: UbuntuColors.blue
- }
+ selected: AmbianceSelected {}
// selected differs from normal in background, base, foreground
- selectedInactive: AmbianceNormal {
+ selectedDisabled: AmbianceSelected {
background: UbuntuColors.porcelain
base: UbuntuColors.porcelain
foreground: UbuntuColors.porcelain
+ // inactive is 30% opaque normal
+ Component.onCompleted: {
+ for (var p in selected) {
+ // skip objectName and all change signals
+ if (p == "objectName" || p.indexOf("Changed") > 0
+ || p == "background" || p == "base" || p == "foreground" ) continue;
+ selectedDisabled[p] = Qt.rgba(selected[p].r, selected[p].g, selected[p].b, 0.3);
+ }
+ }
+ }
+
+ highlighted: AmbianceNormal {
+ background: UbuntuColors.silk
+ base: UbuntuColors.jet
+ foreground: UbuntuColors.silk
}
}
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/PickerStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/PickerStyle.qml 2015-12-04 12:02:19 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/PickerStyle.qml 2016-01-27 16:42:56 +0000
@@ -26,7 +26,7 @@
*/
property color backgroundColor: styledItem.enabled
? theme.palette.normal.foreground
- : theme.palette.inactive.foreground
+ : theme.palette.disabled.foreground
/*!
Background color for highlight.
*/
@@ -34,7 +34,7 @@
/*!
Highlight color.
*/
- property color highlightColor: UbuntuColors.orange
+ property color highlightColor: theme.palette.highlighted.baseText
/*!
Scale of the highlight item
*/
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/PopoverForegroundStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/PopoverForegroundStyle.qml 2015-12-09 12:34:18 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/PopoverForegroundStyle.qml 2016-01-27 16:42:56 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright 2013 Canonical Ltd.
+ * Copyright 2016 Canonical Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,6 +18,9 @@
BubbleShape {
property alias contentItem: content
+ color: styledItem.enabled
+ ? theme.palette.normal.overlay
+ : theme.palette.disabled.overlay
target: styledItem.target
direction: styledItem.direction
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/ProgressBarStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/ProgressBarStyle.qml 2016-01-13 15:57:53 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/ProgressBarStyle.qml 2016-01-27 16:42:56 +0000
@@ -20,10 +20,18 @@
Item {
id: progressBarStyle
- property color foregroundColor: theme.palette.normal.activity
- property color foregroundTextColor: theme.palette.normal.activityText
- property color backgroundColor: theme.palette.normal.base
- property color backgroundTextColor: theme.palette.normal.baseText
+ property color foregroundColor: styledItem.enabled
+ ? theme.palette.normal.activity
+ : theme.palette.disabled.activity
+ property color foregroundTextColor: styledItem.enabled
+ ? theme.palette.normal.activityText
+ : theme.palette.disabled.activityText
+ property color backgroundColor: styledItem.enabled
+ ? theme.palette.normal.base
+ : theme.palette.disabled.base
+ property color backgroundTextColor: styledItem.enabled
+ ? theme.palette.normal.baseText
+ : theme.palette.disabled.baseText
property var progressBar: styledItem
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/ScrollbarStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/ScrollbarStyle.qml 2015-12-16 15:01:29 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/ScrollbarStyle.qml 2016-01-27 16:42:56 +0000
@@ -82,10 +82,10 @@
property real troughThicknessSteppersStyle : units.dp(14)
property real troughThicknessThumbStyle : units.dp(14)
property real troughThicknessIndicatorStyle : units.dp(9)
- property color troughColorThumbStyle: "#CDCDCD"
- property color troughColorSteppersStyle: "#f7f7f7"
+ property color troughColorThumbStyle: theme.palette.normal.foreground
+ property color troughColorSteppersStyle: theme.palette.normal.foreground
- property color sliderColor: "#3b3b3b"
+ property color sliderColor: theme.palette.normal.foregroundText
property real sliderRadius: units.dp(3)
property real thumbThickness: units.gu(1)
property real indicatorThickness : units.dp(3)
@@ -764,11 +764,13 @@
when: !isVertical
value: visible ? troughThicknessSteppersStyle : 0
}
- Image {
+
+ Icon {
anchors.centerIn: parent
rotation: isVertical ? 180 : 90
source: Qt.resolvedUrl("../artwork/scrollbar_arrow.png")
- cache: true
+ color: sliderColor
+ keyColor: "#5d5d5d"
}
}
Rectangle {
@@ -795,12 +797,12 @@
when: !isVertical
value: visible ? troughThicknessSteppersStyle : 0
}
- Image {
+ Icon {
anchors.centerIn: parent
- fillMode: Image.PreserveAspectFit
rotation: isVertical ? 0 : -90
source: Qt.resolvedUrl("../artwork/scrollbar_arrow.png")
- cache: true
+ color: sliderColor
+ keyColor: "#5d5d5d"
}
}
}
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsStyle.qml 2016-01-14 15:10:44 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsStyle.qml 2016-01-27 16:42:56 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Canonical Ltd.
+ * Copyright 2016 Canonical Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -23,22 +23,25 @@
implicitHeight: units.gu(4)
enabled: styledItem.enabled
- opacity: enabled ? 1.0 : 0.5
/*!
The foreground color of unselected sections.
*/
- property color sectionColor: theme.palette.normal.backgroundText
+ property color sectionColor: enabled
+ ? theme.palette.normal.backgroundTertiaryText
+ : theme.palette.disabled.backgroundTertiaryText
/*!
The foreground color of the selected section.
*/
- property color selectedSectionColor: UbuntuColors.orange
+ property color selectedSectionColor: enabled
+ ? theme.palette.selected.backgroundTertiaryText
+ : theme.palette.selectedDisabled.backgroundTertiaryText
/*!
The background color for the pressed section button.
*/
- property color pressedBackgroundColor: theme.palette.selected.background
+ property color pressedBackgroundColor: theme.palette.highlighted.background
/*!
The font size for the text in the buttons.
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/SliderStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/SliderStyle.qml 2015-12-04 09:52:05 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/SliderStyle.qml 2016-01-27 16:42:56 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Canonical Ltd.
+ * Copyright 2016 Canonical Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -116,8 +116,8 @@
id: label
anchors.centerIn: parent
text: styledItem.formatValue(SliderUtils.liveValue(styledItem))
- textSize: Label.Large
- color: theme.palette.normal.raisedText
+ textSize: Label.Medium
+ color: theme.palette.normal.overlayText
}
}
}
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/SwitchStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/SwitchStyle.qml 2016-01-13 14:25:22 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/SwitchStyle.qml 2016-01-27 16:42:56 +0000
@@ -33,16 +33,16 @@
/*!
The background color of the switch.
*/
- property color backgroundColor: styledItem.enabled ? theme.palette.normal.base : theme.palette.inactive.base
+ property color backgroundColor: styledItem.enabled ? theme.palette.normal.base : theme.palette.disabled.base
/*!
The background color of the checked switch.
*/
- property color checkedBackgroundColor: styledItem.enabled ? theme.palette.normal.positive : theme.palette.inactive.base
+ property color checkedBackgroundColor: styledItem.enabled ? theme.palette.normal.positive : theme.palette.disabled.base
/*!
The background color of the thumb.
*/
- property color thumbColor: styledItem.enabled ? theme.palette.normal.raised : theme.palette.inactive.raised
+ property color thumbColor: styledItem.enabled ? theme.palette.normal.raised : theme.palette.disabled.raised
FocusShape {
}
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/TextAreaStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/TextAreaStyle.qml 2015-12-04 10:30:34 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/TextAreaStyle.qml 2016-01-27 16:42:56 +0000
@@ -29,9 +29,9 @@
? ((styledItem.activeFocus || styledItem.highlighted)
? theme.palette.selected.fieldText
: theme.palette.normal.fieldText)
- : theme.palette.inactive.fieldText
- property color selectedTextColor: styledItem.enabled ? theme.palette.selected.selectionText : theme.palette.inactive.selectionText
- property color selectionColor: styledItem.enabled ? theme.palette.selected.selection : theme.palette.inactive.selection
+ : theme.palette.disabled.fieldText
+ property color selectedTextColor: styledItem.enabled ? theme.palette.selected.selectionText : theme.palette.disabled.selectionText
+ property color selectionColor: styledItem.enabled ? theme.palette.selected.selection : theme.palette.disabled.selection
/*!
Background fill color
*/
@@ -39,8 +39,8 @@
? ((styledItem.activeFocus || styledItem.highlighted)
? theme.palette.selected.field
: theme.palette.normal.field)
- : theme.palette.inactive.field
- property color errorColor: styledItem.enabled ? theme.palette.normal.negative : theme.palette.inactive.negative
+ : theme.palette.disabled.field
+ property color errorColor: styledItem.enabled ? theme.palette.normal.negative : theme.palette.disabled.negative
/*!
Spacing between the frame and the text editor area
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/TextCursorStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/TextCursorStyle.qml 2015-12-05 05:59:07 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/TextCursorStyle.qml 2016-01-27 16:42:56 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 Canonical Ltd.
+ * Copyright 2016 Canonical Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -55,8 +55,8 @@
Rectangle {
objectName: "text_cursor_style_" + styledItem.positionProperty
width: cursorWidth
- // FIXME: Extend the palette and use palette values here
- color: UbuntuColors.blue
+ // FIXME: check with design whether should it be activity or something else
+ color: theme.palette.normal.activity
visible: blinkTimer.timerShowCursor || !blinkTimer.running
Timer {
id: blinkTimer
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/ToolbarButtonStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/ToolbarButtonStyle.qml 2015-12-04 10:30:34 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/ToolbarButtonStyle.qml 2016-01-27 16:42:56 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 Canonical Ltd.
+ * Copyright 2016 Canonical Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -29,20 +29,19 @@
Item {
anchors.centerIn: parent
height: icon.height + label.height + label.anchors.topMargin
- opacity: styledItem.enabled ? 1.0 : 0.3
// FIXME: is there a reason we are still using styledItem.iconSource instead of iconName
// so we coudl use the Icon?
- Image {
+ Icon {
id: icon
anchors {
top: parent.top
horizontalCenter: parent.horizontalCenter
}
- sourceSize.width: iconWidth
- sourceSize.height: iconWidth
- source: styledItem.iconSource
- smooth: true
+ width: iconWidth
+ height: iconWidth
+ name: styledItem.iconName
+ color: label.color
}
Label {
@@ -56,8 +55,8 @@
text: styledItem.text
textSize: Label.XSmall
color: styledItem.enabled
- ? theme.palette.normal.raisedText
- : theme.palette.inactive.raisedText
+ ? theme.palette.normal.overlayText
+ : theme.palette.disabled.overlayText
}
}
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/Ambiance.pro'
--- src/Ubuntu/Components/Themes/Ambiance/Ambiance.pro 2016-01-13 14:25:22 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/Ambiance.pro 2016-01-27 16:42:56 +0000
@@ -74,6 +74,7 @@
1.2/ToolbarButtonStyle.qml \
1.2/DeprecatedToolbarStyle.qml \
1.3/AmbianceNormal.qml \
+ 1.3/AmbianceSelected.qml \
1.3/ActionBarStyle.qml \
1.3/ActivityIndicatorStyle.qml \
1.3/BubbleShape.qml \
=== modified file 'src/Ubuntu/Components/Themes/SuruDark/1.3/Palette.qml'
--- src/Ubuntu/Components/Themes/SuruDark/1.3/Palette.qml 2016-01-13 16:07:58 +0000
+++ src/Ubuntu/Components/Themes/SuruDark/1.3/Palette.qml 2016-01-27 16:42:56 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Canonical Ltd.
+ * Copyright 2016 Canonical Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -21,33 +21,42 @@
Palette {
normal: SuruDarkNormal {}
- inactive: SuruDarkNormal {
+ disabled: SuruDarkNormal {
field: UbuntuColors.inkstone
// inactive is 30% transparent normal
Component.onCompleted: {
for (var p in normal) {
// skip objectName and all change signals
- if (p == "objectName" || p == "field" || p.indexOf("Changed") > 0) continue;
- inactive[p] = Qt.rgba(normal[p].r, normal[p].g, normal[p].b, 0.3);
+ if (p == "objectName"|| p.indexOf("Changed") > 0
+ || p == "field" || p == "foreground" ) continue;
+ disabled[p] = Qt.rgba(normal[p].r, normal[p].g, normal[p].b, 0.3);
}
}
}
// selected differs from normal in background, base, foreground
- selected: SuruDarkNormal {
- background: UbuntuColors.inkstone
- backgroundText: UbuntuColors.blue
- base: UbuntuColors.ash
- baseText:UbuntuColors.blue
- foreground: UbuntuColors.slate
- foregroundText: UbuntuColors.blue
- }
+ selected: SuruDarkSelected {}
// selected differs from normal in background, base, foreground
- selectedInactive: SuruDarkNormal {
+ selectedDisabled: SuruDarkSelected {
background: UbuntuColors.inkstone
base: UbuntuColors.inkstone
foreground: UbuntuColors.inkstone
+ // inactive is 30% transparent normal
+ Component.onCompleted: {
+ for (var p in selected) {
+ // skip objectName and all change signals
+ if (p == "objectName"|| p.indexOf("Changed") > 0
+ || p == "field" || p == "foreground" ) continue;
+ selectedDisabled[p] = Qt.rgba(selected[p].r, selected[p].g, selected[p].b, 0.3);
+ }
+ }
+ }
+
+ highlighted: SuruDarkNormal {
+ background: UbuntuColors.slate
+ base: UbuntuColors.graphite
+ foreground: UbuntuColors.slate
}
}
//![0]
=== modified file 'src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkNormal.qml'
--- src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkNormal.qml 2016-01-13 16:07:58 +0000
+++ src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkNormal.qml 2016-01-27 16:42:56 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Canonical Ltd.
+ * Copyright 2016 Canonical Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -24,7 +24,7 @@
backgroundSecondaryText: UbuntuColors.silk
backgroundTertiaryText: UbuntuColors.ash
base: UbuntuColors.graphite
- baseText: UbuntuColors.silk
+ baseText: UbuntuColors.ash
foreground: UbuntuColors.inkstone
foregroundText: "#FFFFFF"
raised: "#FFFFFF"
@@ -35,7 +35,9 @@
overlaySecondaryText: UbuntuColors.slate
field: UbuntuColors.jet
fieldText: "#FFFFFF"
- selection: Qt.rgba(UbuntuColors.orange.r, UbuntuColors.orange.g, UbuntuColors.orange.b, 0.4)
+ focus: UbuntuColors.orange
+ focusText: "#FFFFFF"
+ selection: Qt.rgba(UbuntuColors.blue.r, UbuntuColors.blue.g, UbuntuColors.blue.b, 0.4)
selectionText: "#FFFFFF"
positive: UbuntuColors.green
positiveText: "#FFFFFF"
=== added file 'src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkSelected.qml'
--- src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkSelected.qml 1970-01-01 00:00:00 +0000
+++ src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkSelected.qml 2016-01-27 16:42:56 +0000
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2016 Canonical Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+import QtQuick 2.4
+import Ubuntu.Components 1.3
+import Ubuntu.Components.Themes 1.3
+
+SuruDarkNormal {
+ background: UbuntuColors.inkstone
+ backgroundText: UbuntuColors.blue
+ backgroundTertiaryText: UbuntuColors.blue
+ base: UbuntuColors.ash
+ baseText:UbuntuColors.blue
+ foreground: UbuntuColors.slate
+}
+
=== modified file 'src/Ubuntu/Components/Themes/SuruDark/SuruDark.pro'
--- src/Ubuntu/Components/Themes/SuruDark/SuruDark.pro 2015-12-04 09:23:50 +0000
+++ src/Ubuntu/Components/Themes/SuruDark/SuruDark.pro 2016-01-27 16:42:56 +0000
@@ -9,6 +9,7 @@
1.2/TabBarStyle.qml \
1.3/OptionSelectorStyle.qml \
1.3/SuruDarkNormal.qml \
+ 1.3/SuruDarkSelected.qml \
1.3/Palette.qml \
1.3/TabBarStyle.qml \
$$ARTWORK_FILES \
=== modified file 'src/Ubuntu/Components/plugin/privates/threelabelsslot_p.cpp'
--- src/Ubuntu/Components/plugin/privates/threelabelsslot_p.cpp 2016-01-07 17:09:14 +0000
+++ src/Ubuntu/Components/plugin/privates/threelabelsslot_p.cpp 2016-01-27 16:42:56 +0000
@@ -18,6 +18,7 @@
#include "uclabel.h"
#include "ucunits.h"
#include "ucfontutils.h"
+#include "uctheme.h"
UCThreeLabelsSlotPrivate::UCThreeLabelsSlotPrivate()
: QQuickItemPrivate()
@@ -178,11 +179,19 @@
return d->m_title;
}
+QColor UCThreeLabelsSlot::getSubtitleColor(QQuickItem *item, UCTheme *theme)
+{
+ // FIXME: replace the code below with automatic color
+ // change detection based on teh item's state
+ const char *valueSet = item->isEnabled() ? "normal" : "disabled";
+ return theme ? theme->getPaletteColor(valueSet, "backgroundSecondaryText") : QColor();
+}
+
UCLabel *UCThreeLabelsSlot::subtitle()
{
Q_D(UCThreeLabelsSlot);
if (d->m_subtitle == Q_NULLPTR) {
- d->m_subtitle = new UCLabel(this);
+ d->m_subtitle = new UCLabel(getSubtitleColor, this);
QQmlEngine::setContextForObject(d->m_subtitle, qmlContext(this));
d->m_subtitle->init();
@@ -200,11 +209,19 @@
return d->m_subtitle;
}
+QColor UCThreeLabelsSlot::getSummaryColor(QQuickItem *item, UCTheme *theme)
+{
+ // FIXME: replace the code below with automatic color
+ // change detection based on teh item's state
+ const char *valueSet = item->isEnabled() ? "normal" : "disabled";
+ return theme ? theme->getPaletteColor(valueSet, "backgroundTertiaryText") : QColor();
+}
+
UCLabel *UCThreeLabelsSlot::summary()
{
Q_D(UCThreeLabelsSlot);
if (d->m_summary == Q_NULLPTR) {
- d->m_summary = new UCLabel(this);
+ d->m_summary = new UCLabel(getSummaryColor, this);
QQmlEngine::setContextForObject(d->m_summary, qmlContext(this));
d->m_summary->init();
=== modified file 'src/Ubuntu/Components/plugin/privates/threelabelsslot_p.h'
--- src/Ubuntu/Components/plugin/privates/threelabelsslot_p.h 2016-01-07 17:09:14 +0000
+++ src/Ubuntu/Components/plugin/privates/threelabelsslot_p.h 2016-01-27 16:42:56 +0000
@@ -24,6 +24,7 @@
//summary, when subtitle is empty)
#define TITLE_SPACING_DP 2
+class UCTheme;
class UCLabel;
class UCThreeLabelsSlotPrivate;
class UCThreeLabelsSlot : public QQuickItem
@@ -46,6 +47,9 @@
private:
Q_PRIVATE_SLOT(d_func(), void _q_onGuValueChanged())
Q_PRIVATE_SLOT(d_func(), void _q_updateLabelsAnchorsAndBBoxHeight())
+
+ static QColor getSubtitleColor(QQuickItem *item, UCTheme *theme);
+ static QColor getSummaryColor(QQuickItem *item, UCTheme *theme);
};
class UCThreeLabelsSlotPrivate : public QQuickItemPrivate
=== modified file 'src/Ubuntu/Components/plugin/ucbottomedge.cpp'
--- src/Ubuntu/Components/plugin/ucbottomedge.cpp 2016-01-13 16:07:58 +0000
+++ src/Ubuntu/Components/plugin/ucbottomedge.cpp 2016-01-27 16:42:56 +0000
@@ -62,6 +62,10 @@
Q_Q(UCBottomEdge);
// initialize hint
QQml_setParent_noEvent(hint, q);
+ // keep BottomEdge.enabled in sync with the hint
+ QObject::connect(q, &UCBottomEdge::enabledChanged, [=] {
+ hint->setEnabled2(q->isEnabled());
+ });
// create default regions
createDefaultRegions();
=== modified file 'src/Ubuntu/Components/plugin/uclabel.cpp'
--- src/Ubuntu/Components/plugin/uclabel.cpp 2016-01-13 14:25:22 +0000
+++ src/Ubuntu/Components/plugin/uclabel.cpp 2016-01-27 16:42:56 +0000
@@ -79,9 +79,27 @@
UCLabel::UCLabel(QQuickItem* parent)
: QQuickText(parent)
, UCThemingExtension(this)
- , m_textSize(Medium)
- , m_flags(0)
-{
+ , m_defaultColor(getDefaultColor)
+ , m_textSize(Medium)
+ , m_flags(0)
+{
+}
+
+UCLabel::UCLabel(std::function defaultColor, QQuickItem *parent)
+ : QQuickText(parent)
+ , UCThemingExtension(this)
+ , m_defaultColor(defaultColor)
+ , m_textSize(Medium)
+ , m_flags(0)
+{
+}
+
+QColor UCLabel::getDefaultColor(QQuickItem *item, UCTheme *theme)
+{
+ // FIXME: replace the code below with automatic color
+ // change detection based on teh item's state
+ const char *valueSet = item->isEnabled() ? "normal" : "disabled";
+ return theme ? theme->getPaletteColor(valueSet, "backgroundText") : QColor();
}
void UCLabel::classBegin()
@@ -101,6 +119,7 @@
connect(this, &UCLabel::fontChanged, this, &UCLabel::_q_updateFontFlag, Qt::DirectConnection);
connect(this, &UCLabel::colorChanged, this, &UCLabel::_q_customColor, Qt::DirectConnection);
+ connect(this, &UCLabel::enabledChanged, this, &UCLabel::postThemeChanged, Qt::DirectConnection);
}
void UCLabel::postThemeChanged()
@@ -110,7 +129,7 @@
}
UCTheme *theme = getTheme();
if (theme) {
- setColor(theme->getPaletteColor("normal", "baseText"));
+ setColor(m_defaultColor(this, theme));
m_flags &= ~ColorSet;
}
}
=== modified file 'src/Ubuntu/Components/plugin/uclabel.h'
--- src/Ubuntu/Components/plugin/uclabel.h 2015-10-20 10:19:10 +0000
+++ src/Ubuntu/Components/plugin/uclabel.h 2016-01-27 16:42:56 +0000
@@ -19,6 +19,8 @@
#include
#include "ucthemingextension.h"
+// C++ std lib for std::function declaration
+#include
class UCLabel : public QQuickText, public UCThemingExtension
{
@@ -32,6 +34,8 @@
public:
UCLabel(QQuickItem* parent=0);
+ // custom constructor to create the label with a different default color provider
+ UCLabel(std::function defaultColor, QQuickItem *parent = 0);
//QQuickTextPrivate is not exported as of 5.4.1 so we need the init here
void init();
@@ -74,6 +78,7 @@
private:
void updatePixelSize();
+ static QColor getDefaultColor(QQuickItem *item, UCTheme *theme);
Q_SLOT void _q_updateFontFlag(const QFont &font);
Q_SLOT void _q_customColor();
@@ -84,6 +89,7 @@
};
QFont m_defaultFont;
+ std::function m_defaultColor;
TextSize m_textSize;
quint8 m_flags;
=== modified file 'src/Ubuntu/Components/plugin/uclistitem.cpp'
--- src/Ubuntu/Components/plugin/uclistitem.cpp 2016-01-13 15:40:16 +0000
+++ src/Ubuntu/Components/plugin/uclistitem.cpp 2016-01-27 16:42:56 +0000
@@ -1654,7 +1654,7 @@
d->customColor = false;
UCTheme *theme = getTheme();
if (theme) {
- d->highlightColor = theme->getPaletteColor("selected", "foreground");
+ d->highlightColor = theme->getPaletteColor("highlighted", "background");
}
update();
Q_EMIT highlightColorChanged();
=== modified file 'tests/unit_x11/tst_bottomedge/tst_bottomedge.cpp'
--- tests/unit_x11/tst_bottomedge/tst_bottomedge.cpp 2015-12-17 15:23:26 +0000
+++ tests/unit_x11/tst_bottomedge/tst_bottomedge.cpp 2016-01-27 16:42:56 +0000
@@ -863,6 +863,14 @@
QPoint delta(0, -bottomEdge->height());
UCTestExtras::touchDrag(0, bottomEdge, from, delta, 20);
}
+
+ void test_bottomedge_hint_enabled() {
+ QScopedPointer view(new BottomEdgeTestCase("Defaults.qml"));
+ UCBottomEdge *bottomEdge = view->testItem();
+ QCOMPARE(bottomEdge->isEnabled(), bottomEdge->hint()->isEnabled());
+ bottomEdge->setEnabled(!bottomEdge->isEnabled());
+ QCOMPARE(bottomEdge->isEnabled(), bottomEdge->hint()->isEnabled());
+ }
};
QTEST_MAIN(tst_BottomEdge)
=== modified file 'tests/unit_x11/tst_components/AppTheme/Palette.qml'
--- tests/unit_x11/tst_components/AppTheme/Palette.qml 2016-01-14 06:25:42 +0000
+++ tests/unit_x11/tst_components/AppTheme/Palette.qml 2016-01-27 16:42:56 +0000
@@ -20,5 +20,5 @@
Suru.Palette {
normal.background: "#A21E1C"
- normal.baseText: "lightblue"
+ normal.backgroundText: "lightblue"
}
=== modified file 'tests/unit_x11/tst_components/tst_slotslayout.qml'
--- tests/unit_x11/tst_components/tst_slotslayout.qml 2016-01-07 17:09:14 +0000
+++ tests/unit_x11/tst_components/tst_slotslayout.qml 2016-01-27 16:42:56 +0000
@@ -447,6 +447,13 @@
}
}
+ function initTestCase() {
+ // check the coloring of the mainslot labels
+ compare(layoutEmpty.title.color, theme.palette.normal.backgroundText, "wrong title color");
+ compare(layoutEmpty.subtitle.color, theme.palette.normal.backgroundSecondaryText, "wrong subtitle color");
+ compare(layoutEmpty.summary.color, theme.palette.normal.backgroundTertiaryText, "wrong summary color");
+ }
+
function test_contentPadding_data() {
return standardTestsData()
}