mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-04 18:54:45 +00:00
Port away from the global "theme" object to PlasmaCore.Theme
Like we've done for the rest of Plasma
This commit is contained in:
parent
182d7501d0
commit
d332582328
15 changed files with 23 additions and 23 deletions
|
|
@ -123,7 +123,7 @@ Item {
|
||||||
id: metrics
|
id: metrics
|
||||||
text: "M\nM"
|
text: "M\nM"
|
||||||
visible: false
|
visible: false
|
||||||
font.pointSize: theme.defaultFont.pointSize * 0.9
|
font.pointSize: PlasmaCore.Theme.defaultFont.pointSize * 0.9
|
||||||
}
|
}
|
||||||
|
|
||||||
OpenDrawerButton {
|
OpenDrawerButton {
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ MouseArea {
|
||||||
radius: width
|
radius: width
|
||||||
width: units.smallSpacing
|
width: units.smallSpacing
|
||||||
height: width
|
height: width
|
||||||
color: theme.highlightColor
|
color: PlasmaCore.Theme.highlightColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -95,7 +95,7 @@ MouseArea {
|
||||||
text: model.applicationName
|
text: model.applicationName
|
||||||
|
|
||||||
//FIXME: export smallestReadableFont
|
//FIXME: export smallestReadableFont
|
||||||
font.pointSize: theme.defaultFont.pointSize * 0.9
|
font.pointSize: PlasmaCore.Theme.defaultFont.pointSize * 0.9
|
||||||
color: "white"
|
color: "white"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,7 @@ ContainmentLayoutManager.ItemContainer {
|
||||||
radius: width
|
radius: width
|
||||||
width: PlasmaCore.Units.smallSpacing
|
width: PlasmaCore.Units.smallSpacing
|
||||||
height: width
|
height: width
|
||||||
color: theme.highlightColor
|
color: PlasmaCore.Theme.highlightColor
|
||||||
}
|
}
|
||||||
//TODO: in loader?
|
//TODO: in loader?
|
||||||
Private.DelegateRemoveButton {
|
Private.DelegateRemoveButton {
|
||||||
|
|
@ -155,8 +155,8 @@ ContainmentLayoutManager.ItemContainer {
|
||||||
text: model.applicationName
|
text: model.applicationName
|
||||||
|
|
||||||
//FIXME: export smallestReadableFont
|
//FIXME: export smallestReadableFont
|
||||||
font.pointSize: theme.defaultFont.pointSize * 0.9
|
font.pointSize: PlasmaCore.Theme.defaultFont.pointSize * 0.9
|
||||||
color: "white"//model.applicationLocation == HomeScreenComponents.ApplicationListModel.Desktop ? "white" : theme.textColor
|
color: "white"//model.applicationLocation == HomeScreenComponents.ApplicationListModel.Desktop ? "white" : PlasmaCore.Theme.textColor
|
||||||
|
|
||||||
layer.enabled: true//model.applicationLocation == HomeScreenComponents.ApplicationListModel.Desktop
|
layer.enabled: true//model.applicationLocation == HomeScreenComponents.ApplicationListModel.Desktop
|
||||||
layer.effect: DropShadow {
|
layer.effect: DropShadow {
|
||||||
|
|
|
||||||
|
|
@ -203,7 +203,7 @@ DragDrop.DropArea {
|
||||||
id: metrics
|
id: metrics
|
||||||
text: "M\nM"
|
text: "M\nM"
|
||||||
visible: false
|
visible: false
|
||||||
font.pointSize: theme.defaultFont.pointSize * 0.9
|
font.pointSize: PlasmaCore.Theme.defaultFont.pointSize * 0.9
|
||||||
}
|
}
|
||||||
LauncherRepeater {
|
LauncherRepeater {
|
||||||
id: launcherRepeater
|
id: launcherRepeater
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ Item {
|
||||||
id: metrics
|
id: metrics
|
||||||
text: "M\nM"
|
text: "M\nM"
|
||||||
visible: false
|
visible: false
|
||||||
font.pointSize: theme.defaultFont.pointSize * 0.9
|
font.pointSize: PlasmaCore.Theme.defaultFont.pointSize * 0.9
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ PlasmaCore.ToolTipArea {
|
||||||
id: actionText
|
id: actionText
|
||||||
text: button.text
|
text: button.text
|
||||||
style: Text.Outline
|
style: Text.Outline
|
||||||
color: theme.textColor
|
color: PlasmaCore.Theme.textColor
|
||||||
styleColor: Qt.rgba(1,1,1,0.4)
|
styleColor: Qt.rgba(1,1,1,0.4)
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ MouseArea {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
verticalCenterOffset: -arrowUpIcon.height/4 + (arrowUpIcon.height/4) * arrowUpIcon.factor
|
verticalCenterOffset: -arrowUpIcon.height/4 + (arrowUpIcon.height/4) * arrowUpIcon.factor
|
||||||
}
|
}
|
||||||
color: PlasmaCore.Theme.complementaryBackgroundColor
|
color: PlasmaCore.Theme.backgroundColor
|
||||||
transformOrigin: Item.Right
|
transformOrigin: Item.Right
|
||||||
rotation: -45 + 90 * arrowUpIcon.factor
|
rotation: -45 + 90 * arrowUpIcon.factor
|
||||||
antialiasing: true
|
antialiasing: true
|
||||||
|
|
@ -64,7 +64,7 @@ MouseArea {
|
||||||
right: parent.right
|
right: parent.right
|
||||||
verticalCenterOffset: -arrowUpIcon.height/4 + (arrowUpIcon.height/4) * arrowUpIcon.factor
|
verticalCenterOffset: -arrowUpIcon.height/4 + (arrowUpIcon.height/4) * arrowUpIcon.factor
|
||||||
}
|
}
|
||||||
color: PlasmaCore.Theme.complementaryBackgroundColor
|
color: PlasmaCore.Theme.backgroundColor
|
||||||
transformOrigin: Item.Left
|
transformOrigin: Item.Left
|
||||||
rotation: 45 - 90 * arrowUpIcon.factor
|
rotation: 45 - 90 * arrowUpIcon.factor
|
||||||
antialiasing: true
|
antialiasing: true
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ ColumnLayout {
|
||||||
text: delegateRoot.text
|
text: delegateRoot.text
|
||||||
bottomPadding: units.smallSpacing * 2
|
bottomPadding: units.smallSpacing * 2
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
font.pixelSize: theme.defaultFont.pixelSize * 0.8
|
font.pixelSize: PlasmaCore.Theme.defaultFont.pixelSize * 0.8
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ Item {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
radius: units.smallSpacing
|
radius: units.smallSpacing
|
||||||
color: theme.backgroundColor
|
color: PlasmaCore.Theme.backgroundColor
|
||||||
opacity: 1 * (1-Math.abs(x)/width)
|
opacity: 1 * (1-Math.abs(x)/width)
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
|
@ -126,7 +126,7 @@ Item {
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
text: model.AppName
|
text: model.AppName
|
||||||
color: theme.textColor
|
color: PlasmaCore.Theme.textColor
|
||||||
}
|
}
|
||||||
PlasmaComponents.ToolButton {
|
PlasmaComponents.ToolButton {
|
||||||
z: 99
|
z: 99
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ Item {
|
||||||
|
|
||||||
PlasmaComponents3.Label {
|
PlasmaComponents3.Label {
|
||||||
id: label
|
id: label
|
||||||
font.pointSize: Math.max(fontSize + 1,theme.defaultFont.pointSize + 1)
|
font.pointSize: Math.max(fontSize + 1,PlasmaCore.Theme.defaultFont.pointSize + 1)
|
||||||
anchors {
|
anchors {
|
||||||
top: icon.bottom
|
top: icon.bottom
|
||||||
topMargin: (softwareRendering ? 1.5 : 1) * units.smallSpacing
|
topMargin: (softwareRendering ? 1.5 : 1) * units.smallSpacing
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ Item {
|
||||||
|
|
||||||
PlasmaComponents.Label {
|
PlasmaComponents.Label {
|
||||||
id: usernameDelegate
|
id: usernameDelegate
|
||||||
font.pointSize: Math.max(fontSize + 2,theme.defaultFont.pointSize + 2)
|
font.pointSize: Math.max(fontSize + 2, PlasmaCore.Theme.defaultFont.pointSize + 2)
|
||||||
anchors {
|
anchors {
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
horizontalCenter: parent.horizontalCenter
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ Item {
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
text: mpris2Source.track || i18nd("plasma_lookandfeel_org.kde.lookandfeel", "No media playing")
|
text: mpris2Source.track || i18nd("plasma_lookandfeel_org.kde.lookandfeel", "No media playing")
|
||||||
textFormat: Text.PlainText
|
textFormat: Text.PlainText
|
||||||
font.pointSize: theme.defaultFont.pointSize + 1
|
font.pointSize: PlasmaCore.Theme.defaultFont.pointSize + 1
|
||||||
maximumLineCount: 1
|
maximumLineCount: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -119,7 +119,7 @@ Item {
|
||||||
// if no artist is given, show player name instead
|
// if no artist is given, show player name instead
|
||||||
text: mpris2Source.artist || mpris2Source.identity || ""
|
text: mpris2Source.artist || mpris2Source.identity || ""
|
||||||
textFormat: Text.PlainText
|
textFormat: Text.PlainText
|
||||||
font.pointSize: theme.smallestFont.pointSize + 1
|
font.pointSize: PlasmaCore.Theme.smallestFont.pointSize + 1
|
||||||
maximumLineCount: 1
|
maximumLineCount: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -80,11 +80,11 @@ RowLayout {
|
||||||
// and plasma-pa:VolumeSlider.qml
|
// and plasma-pa:VolumeSlider.qml
|
||||||
color: {
|
color: {
|
||||||
if (progressBar.value <= 100) {
|
if (progressBar.value <= 100) {
|
||||||
return theme.textColor
|
return PlasmaCore.Theme.textColor
|
||||||
} else if (progressBar.value > 100 && progressBar.value <= 125) {
|
} else if (progressBar.value > 100 && progressBar.value <= 125) {
|
||||||
return theme.neutralTextColor
|
return PlasmaCore.Theme.neutralTextColor
|
||||||
} else {
|
} else {
|
||||||
return theme.negativeTextColor
|
return PlasmaCore.Theme.negativeTextColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ Rectangle {
|
||||||
visible: false //adjust borders is run during setup. We want to avoid painting till completed
|
visible: false //adjust borders is run during setup. We want to avoid painting till completed
|
||||||
property Item containment
|
property Item containment
|
||||||
|
|
||||||
color: (containment && containment.backgroundHints == PlasmaCore.Types.NoBackground) ? "transparent" : theme.textColor
|
color: (containment && containment.backgroundHints == PlasmaCore.Types.NoBackground) ? "transparent" : PlasmaCore.Theme.textColor
|
||||||
|
|
||||||
function toggleWidgetExplorer(containment) {
|
function toggleWidgetExplorer(containment) {
|
||||||
console.log("Widget Explorer toggled");
|
console.log("Widget Explorer toggled");
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ Rectangle {
|
||||||
visible: false //adjust borders is run during setup. We want to avoid painting till completed
|
visible: false //adjust borders is run during setup. We want to avoid painting till completed
|
||||||
property Item containment
|
property Item containment
|
||||||
|
|
||||||
color: !containment || containment.backgroundHints == PlasmaCore.Types.NoBackground ? "transparent" : theme.textColor
|
color: !containment || containment.backgroundHints == PlasmaCore.Types.NoBackground ? "transparent" : PlasmaCore.Theme.textColor
|
||||||
|
|
||||||
onContainmentChanged: {
|
onContainmentChanged: {
|
||||||
containment.parent = root;
|
containment.parent = root;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue