Commit 33b13889 authored by Filip Fila's avatar Filip Fila 🌆
Browse files

[Kickoff] Theme separators

Summary:
Kickoff's separators were drawn as rectangles which doesn't allow them to be themed.

We have the infrastructure to theme lines though so this patch makes use of it.

The benefit is that themes can now gracefully incorporate separators into their design.

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D26866
parent 74f7e064
...@@ -118,18 +118,19 @@ Item { ...@@ -118,18 +118,19 @@ Item {
id: header id: header
} }
Rectangle { PlasmaCore.SvgItem {
id: headerSeparator id: headerSeparator
height: Math.floor(units.devicePixelRatio)
color: theme.textColor
opacity: 0.2
width: root.width - 2 * units.gridUnit
anchors { anchors {
top: header.top top: header.top
horizontalCenter: header.horizontalCenter horizontalCenter: header.horizontalCenter
} }
height: headerSeparatorLine.elementSize("horizontal-line").height
width: root.width - 2 * units.gridUnit
elementId: "horizontal-line"
svg: PlasmaCore.Svg {
id: headerSeparatorLine
imagePath: "widgets/line"
}
} }
Item { Item {
...@@ -233,7 +234,8 @@ Item { ...@@ -233,7 +234,8 @@ Item {
} }
PropertyChanges { PropertyChanges {
target:tabBarSeparator target:tabBarSeparator
width: Math.floor(units.devicePixelRatio) width: tabBarSeparatorLine.elementSize("vertical-line").width
elementId: "vertical-line"
} }
AnchorChanges { AnchorChanges {
target: tabBarSeparator target: tabBarSeparator
...@@ -283,7 +285,8 @@ Item { ...@@ -283,7 +285,8 @@ Item {
} }
PropertyChanges { PropertyChanges {
target:tabBarSeparator target:tabBarSeparator
height: Math.floor(units.devicePixelRatio) height: tabBarSeparatorLine.elementSize("horizontal-line").height
elementId: "horizontal-line"
} }
AnchorChanges { AnchorChanges {
target: tabBarSeparator target: tabBarSeparator
...@@ -333,7 +336,8 @@ Item { ...@@ -333,7 +336,8 @@ Item {
} }
PropertyChanges { PropertyChanges {
target:tabBarSeparator target:tabBarSeparator
width: Math.floor(units.devicePixelRatio) width: tabBarSeparatorLine.elementSize("vertical-line").width
elementId: "vertical-line"
} }
AnchorChanges { AnchorChanges {
target: tabBarSeparator target: tabBarSeparator
...@@ -390,7 +394,8 @@ Item { ...@@ -390,7 +394,8 @@ Item {
} }
PropertyChanges { PropertyChanges {
target:tabBarSeparator target:tabBarSeparator
height: Math.floor(units.devicePixelRatio) height: tabBarSeparatorLine.elementSize("horizontal-line").height
elementId: "horizontal-line"
} }
AnchorChanges { AnchorChanges {
target: tabBarSeparator target: tabBarSeparator
...@@ -447,11 +452,12 @@ Item { ...@@ -447,11 +452,12 @@ Item {
} }
} // tabBar } // tabBar
Rectangle { PlasmaCore.SvgItem {
id: tabBarSeparator id: tabBarSeparator
svg: PlasmaCore.Svg {
color: theme.textColor id: tabBarSeparatorLine
opacity: 0.2 imagePath: "widgets/line"
}
} }
MouseArea { MouseArea {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment