Commit 99d7d9df authored by Erik Reider's avatar Erik Reider

Unify all default widget margins and padding

All the widgets now have the same padding and margins
parent a00a16ae
...@@ -361,6 +361,12 @@ $margin: 8px; ...@@ -361,6 +361,12 @@ $margin: 8px;
} }
/*** Widgets ***/ /*** Widgets ***/
.widget {
margin: $margin;
padding: $margin;
border-radius: var(--border-radius);
}
/* Title widget */ /* Title widget */
@import "widgets/title"; @import "widgets/title";
/* DND widget */ /* DND widget */
......
.widget-backlight { .widget-backlight {
padding: $margin; }
margin: $margin;
border-radius: var(--border-radius);
}
\ No newline at end of file
.widget-buttons-grid { .widget-buttons-grid {
padding: $margin;
margin: $margin;
border-radius: var(--border-radius);
& flowboxchild>button { & flowboxchild>button {
border-radius: var(--border-radius); border-radius: var(--border-radius);
...@@ -12,4 +8,4 @@ ...@@ -12,4 +8,4 @@
&:hover {} &:hover {}
} }
} }
\ No newline at end of file
.widget-dnd { .widget-dnd {
label { label {
color: var(--text-color); color: var(--text-color);
margin: $margin; margin-right: $margin;
font-size: 1.1rem; font-size: 1.1rem;
} }
switch { switch {
border-radius: var(--border-radius); border-radius: var(--border-radius);
margin: $margin; margin-left: $margin;
&:checked {} &:checked {}
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
border-radius: var(--border-radius); border-radius: var(--border-radius);
} }
} }
} }
\ No newline at end of file
.widget-inhibitors { .widget-inhibitors {
&>label { & > label {
margin: $margin; margin-right: $margin;
font-size: 1.5rem; font-size: 1.5rem;
} }
&>button { & > button {
margin: $margin; margin-left: $margin;
border-radius: var(--border-radius); border-radius: var(--border-radius);
} }
} }
\ No newline at end of file
.widget-label { .widget-label {
margin: $margin;
& > label { & > label {
font-size: 1.1rem; font-size: 1.1rem;
} }
......
.widget-menubar { .widget-menubar {
&>.menu-button-bar { & > .menu-button-bar {
/* The left button container */ /* The left button container */
&>.start { & > .start {
margin-left: $margin; margin-left: $margin;
} }
/* The right button container */ /* The right button container */
&>.end { & > .end {
margin-right: $margin; margin-right: $margin;
} }
/* The left and right button container */ /* The left and right button container */
&>.widget-menubar-container { & > .widget-menubar-container {
button { button {
border-radius: var(--border-radius); border-radius: var(--border-radius);
margin: 0 $margin / 2; margin: 0 $margin / 2;
...@@ -21,13 +20,19 @@ ...@@ -21,13 +20,19 @@
} }
/* The revealer buttons */ /* The revealer buttons */
&>revealer { & > revealer {
margin-top: $margin; * {
margin-top: $margin;
button {
border-radius: var(--border-radius);
margin: $margin;
margin-top: 0;
button { &:last-child {
border-radius: var(--border-radius); margin-bottom: 0;
margin: $margin; }
margin-top: 0; }
} }
} }
...@@ -46,4 +51,5 @@ ...@@ -46,4 +51,5 @@
.AnyName>button:hover { .AnyName>button:hover {
background-color: var(--noti-bg-hover); background-color: var(--noti-bg-hover);
} */ } */
} }
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
} }
.widget-mpris { .widget-mpris {
margin: $margin; padding: 0;
/* The parent to all players */ /* The parent to all players */
.widget-mpris-player { .widget-mpris-player {
......
.widget-slider { .widget-slider {
padding: $margin;
margin: $margin;
border-radius: var(--border-radius);
label { label {
font-size: inherit; font-size: inherit;
} }
} }
\ No newline at end of file
.widget-title { .widget-title {
&>label { & > label {
margin: $margin; margin-right: $margin;
font-size: 1.5rem; font-size: 1.5rem;
} }
&>button { & > button {
margin: $margin; margin-left: $margin;
border-radius: var(--border-radius); border-radius: var(--border-radius);
} }
} }
\ No newline at end of file
...@@ -3,9 +3,6 @@ ...@@ -3,9 +3,6 @@
} }
.widget-volume { .widget-volume {
padding: $margin;
margin: $margin;
border-radius: var(--border-radius);
} }
.widget-volume>box>button {} .widget-volume>box>button {}
...@@ -17,7 +14,7 @@ ...@@ -17,7 +14,7 @@
.per-app-volume { .per-app-volume {
background-color: var(--noti-bg-alt); background-color: var(--noti-bg-alt);
padding: $margin/2 $margin $margin $margin; margin: $margin;
margin: 0px $margin $margin $margin; margin-bottom: 0;
border-radius: var(--border-radius); border-radius: var(--border-radius);
} }
\ No newline at end of file
...@@ -20,8 +20,18 @@ template $SwayNotificationCenterControlCenter: ApplicationWindow { ...@@ -20,8 +20,18 @@ template $SwayNotificationCenterControlCenter: ApplicationWindow {
orientation: vertical; orientation: vertical;
vexpand: true; vexpand: true;
styles [
"widgets",
]
Box notifications_box { Box notifications_box {
orientation: vertical; orientation: vertical;
overflow: hidden;
styles [
"widget",
"widget-notifications",
]
Stack stack { Stack stack {
hhomogeneous: true; hhomogeneous: true;
......
...@@ -34,6 +34,8 @@ namespace SwayNotificationCenter.Widgets { ...@@ -34,6 +34,8 @@ namespace SwayNotificationCenter.Widgets {
this.swaync_daemon = swaync_daemon; this.swaync_daemon = swaync_daemon;
this.noti_daemon = noti_daemon; this.noti_daemon = noti_daemon;
set_overflow (Gtk.Overflow.HIDDEN);
add_css_class ("widget");
add_css_class (css_class_name); add_css_class (css_class_name);
if (suffix.length > 0) add_css_class (suffix); if (suffix.length > 0) add_css_class (suffix);
} }
......
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