Skip to content

Commit

Permalink
Cinnamon: Add support for the new polkit dialog (linuxmint#468)
Browse files Browse the repository at this point in the history
This updates support in both Mint-X and Mint-Y themes.
  • Loading branch information
JosephMcc committed Apr 5, 2024
1 parent b1dfbc5 commit b36a70d
Show file tree
Hide file tree
Showing 4 changed files with 259 additions and 0 deletions.
91 changes: 91 additions & 0 deletions src/Mint-X/theme/Mint-X/cinnamon/cinnamon.css
Original file line number Diff line number Diff line change
Expand Up @@ -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
* ###################################################################*/
Expand Down
52 changes: 52 additions & 0 deletions src/Mint-Y/cinnamon/cinnamon-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
52 changes: 52 additions & 0 deletions src/Mint-Y/cinnamon/cinnamon.css
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
64 changes: 64 additions & 0 deletions src/Mint-Y/cinnamon/sass/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b36a70d

Please sign in to comment.