mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 07:03:08 +00:00
popups: Use dark background and consistent outlines with action drawer
Have popup views use a similar coloring scheme as the action drawer, which was introduced with https://invent.kde.org/plasma/plasma-mobile/-/merge_requests/827
This commit is contained in:
parent
ddc04069a3
commit
7cecb980d7
5 changed files with 6 additions and 9 deletions
|
|
@ -37,7 +37,8 @@ Item {
|
|||
panelType === PanelBackground.PanelType.Wallpaper)
|
||||
// whether the panel should have a border when using a dark theme
|
||||
readonly property bool border: panelType === PanelBackground.PanelType.Base ||
|
||||
panelType === PanelBackground.PanelType.Stacked
|
||||
panelType === PanelBackground.PanelType.Stacked ||
|
||||
panelType === PanelBackground.PanelType.Popup
|
||||
// whether to force the panel to have a border even when using a light theme
|
||||
readonly property bool forceBorder: border &&
|
||||
(panelType === PanelBackground.PanelType.Stacked)
|
||||
|
|
@ -70,7 +71,7 @@ Item {
|
|||
// corner radius of the panel
|
||||
property int radius: Kirigami.Units.cornerRadius
|
||||
|
||||
Kirigami.Theme.colorSet: Kirigami.Theme.View
|
||||
Kirigami.Theme.colorSet: panelType === PanelBackground.PanelType.Popup ? Kirigami.Theme.Window : Kirigami.Theme.View
|
||||
Kirigami.Theme.inherit: false
|
||||
|
||||
// very simple shadow for performance
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ Window {
|
|||
property QtObject timeSource
|
||||
property bool inhibited
|
||||
|
||||
Kirigami.Theme.colorSet: Kirigami.Theme.View
|
||||
Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
|
||||
Kirigami.Theme.inherit: false
|
||||
|
||||
readonly property color backgroundColor: Qt.darker(Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.95), 1.05)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ import org.kde.plasma.private.mobileshell as MobileShell
|
|||
Controls.Control {
|
||||
id: content
|
||||
|
||||
property bool popupBackground: false
|
||||
property real scaleFactor: 1.0
|
||||
|
||||
implicitWidth: Math.min(Kirigami.Units.gridUnit * 20, Screen.width - Kirigami.Units.gridUnit * 2)
|
||||
|
|
@ -39,8 +38,6 @@ Controls.Control {
|
|||
|
||||
MobileShell.PanelBackground {
|
||||
anchors.fill: parent
|
||||
panelType: content.popupBackground ?
|
||||
MobileShell.PanelBackground.PanelType.Popup :
|
||||
MobileShell.PanelBackground.PanelType.Drawer
|
||||
panelType: MobileShell.PanelBackground.PanelType.Popup
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -140,7 +140,6 @@ Window {
|
|||
id: osd
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
implicitWidth: Math.min(Kirigami.Units.gridUnit * 15, Screen.width - Kirigami.Units.gridUnit * 2)
|
||||
popupBackground: true
|
||||
|
||||
transform: [
|
||||
Translate {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ Window {
|
|||
|
||||
readonly property color backgroundColor: Qt.darker(Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.95), 1.05)
|
||||
|
||||
Kirigami.Theme.colorSet: Kirigami.Theme.View
|
||||
Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
|
||||
Kirigami.Theme.inherit: false
|
||||
|
||||
color: backgroundColor
|
||||
|
|
|
|||
Loading…
Reference in a new issue