From b36a70d1f848d901ca2c6348306411681d675e23 Mon Sep 17 00:00:00 2001 From: JosephMcc Date: Fri, 5 Apr 2024 12:13:03 -0700 Subject: [PATCH] Cinnamon: Add support for the new polkit dialog (#468) This updates support in both Mint-X and Mint-Y themes. --- src/Mint-X/theme/Mint-X/cinnamon/cinnamon.css | 91 +++++++++++++++++++ src/Mint-Y/cinnamon/cinnamon-dark.css | 52 +++++++++++ src/Mint-Y/cinnamon/cinnamon.css | 52 +++++++++++ src/Mint-Y/cinnamon/sass/_common.scss | 64 +++++++++++++ 4 files changed, 259 insertions(+) diff --git a/src/Mint-X/theme/Mint-X/cinnamon/cinnamon.css b/src/Mint-X/theme/Mint-X/cinnamon/cinnamon.css index d2d17641..f5f05db6 100644 --- a/src/Mint-X/theme/Mint-X/cinnamon/cinnamon.css +++ b/src/Mint-X/theme/Mint-X/cinnamon/cinnamon.css @@ -1366,6 +1366,97 @@ StScrollBar StButton#vhandle:hover { -boxpointer-gap: 2px; } +/* =================================================================== + * Policykit authentication dialog + * ===================================================================*/ + +.polkit-dialog { + /* this is the width of the entire modal popup */ + width: 500px; +} + +.polkit-dialog-main-layout { + spacing: 10px; +} + +.polkit-dialog-headline { + text-align: center; + font-size: 1.3em; + font-weight: bold; + color: rgb(70, 70, 70); +} + +.polkit-dialog-description { + text-align: center; + font-size: 1em; + color: rgb(70, 70, 70); +} + +.polkit-dialog-user-layout { + spacing: 10px; +} + +.polkit-dialog-user-layout:rtl { + padding-right: 10px; +} + +.polkit-dialog-user-root-label { + color: #ff0000; +} + +.polkit-dialog-password-label:ltr { + padding-top: 0.5em; + padding-right: 0.5em; +} + +.polkit-dialog-password-label:rtl { + padding-left: 0.5em; +} + +.polkit-dialog-password-entry { + padding: 4px 12px; + color: #2b2b2b; + border-image: url("misc-assets/entry.png") 6; + border-radius: 4px; + caret-color: #2b2b2b; + caret-size: 1px; + width: 250px; + height: 16px; + transition-duration: 300; + selected-color: #fff; + selection-background-color: #accd8a; +} + +.polkit-dialog-password-entry:focus { + padding: 4px 12px; + color: #2b2b2b; + border-image: url("misc-assets/entry-focus.png") 6; + border-radius: 4px; + width: 250px; + height: 16px; + selected-color: #fff; + caret-color: #2b2b2b; + caret-size: 1px; + selection-background-color: #accd8a; + transition-duration: 150; +} + +.polkit-dialog-password-entry .capslock-warning { + icon-size: 16px; + warning-color: rgb(64, 64, 64); + padding: 0 4px; +} + +.polkit-dialog-error-label { + text-align: center; + font-size: 1em; + color: #ff0000; +} + +.polkit-dialog-info-label { + font-size: 1em; +} + /* ################################################################### * Cinnamon Specific Section * ###################################################################*/ diff --git a/src/Mint-Y/cinnamon/cinnamon-dark.css b/src/Mint-Y/cinnamon/cinnamon-dark.css index a267a073..811e86c0 100644 --- a/src/Mint-Y/cinnamon/cinnamon-dark.css +++ b/src/Mint-Y/cinnamon/cinnamon-dark.css @@ -1008,6 +1008,58 @@ StScrollBar { box-shadow: none; background: none; } +.polkit-dialog { + width: 500px; } + .polkit-dialog-main-layout { + spacing: 10px; } + .polkit-dialog-headline { + color: rgba(255, 255, 255, 0.87); + text-align: center; + font-size: 1.3em; + font-weight: bold; } + .polkit-dialog-description { + color: rgba(255, 255, 255, 0.87); + text-align: center; + font-size: 1em; } + .polkit-dialog-user-layout { + spacing: 10px; } + .polkit-dialog-user-layout:rtl { + padding-right: 10px; } + .polkit-dialog-user-root-label { + color: #FC4138; } + .polkit-dialog-password-label:ltr { + padding-top: 0.5em; + padding-right: 0.5em; } + .polkit-dialog-password-label:rtl { + padding-left: 0.5em; } + .polkit-dialog-password-entry { + width: 21em; + height: 1.2em; + padding: 7px; + border-radius: 3px; + caret-color: #c3c3c3; + selected-color: #ffffff; + selection-background-color: #35a854; + color: #c3c3c3; + background-color: rgba(109, 109, 109, 0.4); + border: 1px solid rgba(22, 22, 22, 0.4); + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05); } + .polkit-dialog-password-entry:focus { + color: rgba(255, 255, 255, 0.87); + background-color: #404040; + border: 1px solid #35a854; + box-shadow: inset 0 2px 4px rgba(64, 64, 64, 0.05); } + .polkit-dialog-password-entry .caplocks-warning { + icon-size: 16px; + warning-color: #F27835; + padding: 0 4px; } + .polkit-dialog-error-label { + color: #FC4138; + text-align: center; + font-size: 1em; } + .polkit-dialog-info-label { + font-size: 1em; } + /* CinnamonMountOperation Dialogs */ .cinnamon-mount-operation-icon { icon-size: 48px; } diff --git a/src/Mint-Y/cinnamon/cinnamon.css b/src/Mint-Y/cinnamon/cinnamon.css index 1c5b372a..9839dbf9 100644 --- a/src/Mint-Y/cinnamon/cinnamon.css +++ b/src/Mint-Y/cinnamon/cinnamon.css @@ -1008,6 +1008,58 @@ StScrollBar { box-shadow: none; background: none; } +.polkit-dialog { + width: 500px; } + .polkit-dialog-main-layout { + spacing: 10px; } + .polkit-dialog-headline { + color: #303030; + text-align: center; + font-size: 1.3em; + font-weight: bold; } + .polkit-dialog-description { + color: #303030; + text-align: center; + font-size: 1em; } + .polkit-dialog-user-layout { + spacing: 10px; } + .polkit-dialog-user-layout:rtl { + padding-right: 10px; } + .polkit-dialog-user-root-label { + color: #FC4138; } + .polkit-dialog-password-label:ltr { + padding-top: 0.5em; + padding-right: 0.5em; } + .polkit-dialog-password-label:rtl { + padding-left: 0.5em; } + .polkit-dialog-password-entry { + width: 21em; + height: 1.2em; + padding: 7px; + border-radius: 3px; + caret-color: #c3c3c3; + selected-color: #ffffff; + selection-background-color: #35a854; + color: #c3c3c3; + background-color: rgba(109, 109, 109, 0.4); + border: 1px solid rgba(22, 22, 22, 0.4); + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05); } + .polkit-dialog-password-entry:focus { + color: #303030; + background-color: #f4f4f4; + border: 1px solid #35a854; + box-shadow: inset 0 2px 4px rgba(244, 244, 244, 0.05); } + .polkit-dialog-password-entry .caplocks-warning { + icon-size: 16px; + warning-color: #F27835; + padding: 0 4px; } + .polkit-dialog-error-label { + color: #FC4138; + text-align: center; + font-size: 1em; } + .polkit-dialog-info-label { + font-size: 1em; } + /* CinnamonMountOperation Dialogs */ .cinnamon-mount-operation-icon { icon-size: 48px; } diff --git a/src/Mint-Y/cinnamon/sass/_common.scss b/src/Mint-Y/cinnamon/sass/_common.scss index b93ca417..5cfdb2c1 100644 --- a/src/Mint-Y/cinnamon/sass/_common.scss +++ b/src/Mint-Y/cinnamon/sass/_common.scss @@ -1293,6 +1293,70 @@ StScrollBar { } } +// +// Polkit Dialog +// +.polkit-dialog { + width: 500px; + + &-main-layout { spacing: 10px; } + + &-headline { + color: $fg_color; + text-align: center; + font-size: 1.3em; + font-weight: bold; + } + + &-description { + color: $fg_color; + text-align: center; + font-size: 1em; + } + + &-user-layout { spacing: 10px; } + &-user-layout:rtl { padding-right: 10px; } + + &-user-root-label { color: $error_color; } + + &-password-label:ltr { + padding-top: 0.5em; + padding-right: 0.5em; + } + + &-password-label:rtl { + padding-left: 0.5em; + } + + &-password-entry { + width: 21em; + height: 1.2em; + padding: 7px; + border-radius: 3px; + caret-color: $osd_fg_color; + selected-color: $selected_fg_color; + selection-background-color: $selected_bg_color; + + @include entry(osd); + + &:focus { @include entry(focus); } + + .caplocks-warning { + icon-size: 16px; + warning-color: $warning_color; + padding: 0 4px; + } + } + + &-error-label { + color: $error_color; + text-align: center; + font-size: 1em; + } + + &-info-label { font-size: 1em; } +} + /* CinnamonMountOperation Dialogs */ .cinnamon-mount-operation-icon { icon-size: 48px;