summaryrefslogtreecommitdiff
path: root/res/styles/partials/_control-center.scss
blob: 991f8e162e18aa7cdf5153a2cf7a7d1f66c5932d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
//
// Styles for the control center, including its "controls" and "notifications" sections.
//

window.control-center {
  // XXX: To prevent some glitches
  background: rgba(0, 0, 0, 0.005);
  border-radius: $foobar-dim-radius-large;

  & > box {
    background: $foobar-color-background-primary;
    // XXX: Applying the border directly to the window seems to confuse hyprland, GTK, or something else.
    // To reproduce: set position to "right", alignment to "start", and foobar-dim-border-light to some large value.
    border: $foobar-dim-border-light solid $foobar-color-border;
    border-radius: $foobar-dim-radius-large;
  }

  & control-button,
  & control-slider {
    background: $foobar-color-background-secondary;
    border: $foobar-dim-border-light solid $foobar-color-border;
    border-radius: $foobar-dim-radius-large;
    transition: background-color 0.1s, border 0.1s;

    & label,
    & image {
      transition: color 0.1s;
    }

    & image {
      -gtk-icon-size: 20px;
    }

    & button {
      transition: background-color 0.1s, color 0.1s;
      border: none;
      box-shadow: none;
      border-radius: 0;

      // "Linked" style

      &:last-child {
        border-top-right-radius: $foobar-dim-radius-large;
        border-bottom-right-radius: $foobar-dim-radius-large;
      }

      &:first-child {
        border-top-left-radius: $foobar-dim-radius-large;
        border-bottom-left-radius: $foobar-dim-radius-large;
      }
    }

    & scale {
      margin-top: $foobar-dim-spacing-medium;
    }

    & > .primary {
      padding: $foobar-dim-margin-medium-vertical $foobar-dim-margin-medium-horizontal;

      & label {
        font-weight: bold;
      }

      & image {
        margin-right: $foobar-dim-spacing-medium;
      }
    }

    & > .expand {
      border-left: $foobar-dim-border-light solid $foobar-color-border;
      padding: $foobar-dim-margin-small-vertical $foobar-dim-margin-small-horizontal;

      & image {
        transition: transform 0.1s;
        transform: rotate(0deg);
      }
    }

    &.toggled {
      background: $foobar-color-accent-primary;

      & label,
      & image {
        color: $foobar-color-background-primary;
      }
    }

    &.expanded {
      & > .expand image {
        transform: rotate(90deg);
      }
    }
  }

  & control-details {
    & scrolledwindow {
      background: $foobar-color-background-secondary;
      border-top: $foobar-dim-border-light solid $foobar-color-border;
      border-bottom: $foobar-dim-border-light solid $foobar-color-border;
    }

    & row {
      $inset: $foobar-dim-spacing-medium;

      padding-top: $foobar-dim-margin-small-vertical;
      padding-bottom: $foobar-dim-margin-small-vertical;
      padding-left: $foobar-dim-margin-medium-horizontal - $inset; // Aligned to primary button content
      padding-right: $foobar-dim-margin-small-horizontal - $inset; // Aligned to expand button content
      margin-top: $inset;
      margin-left: $inset;
      margin-right: $inset;
      border-radius: $foobar-dim-radius-small;

      &:last-child {
        margin-bottom: $inset;
      }

      & .accessory {
        margin-left: $foobar-dim-spacing-medium;
      }
    }
  }

  & .notifications {
    & row,
    & row:hover,
    & row:active,
    & row:focus ,
    & row:selected {
      background: transparent;
    }

    & notification .content {
      background: $foobar-color-background-secondary;
    }
  }

  & .placeholder {
    font-size: $foobar-dim-font-large;
    color: $foobar-color-foreground-secondary;
  }
}