Skip to content

Commit cfe6f36

Browse files
committed
simplify styles
1 parent 239fe1a commit cfe6f36

File tree

4 files changed

+20
-24
lines changed

4 files changed

+20
-24
lines changed

src/renderer/components.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,12 @@
3030
}
3131

3232
@utility button {
33-
@apply relative text-center text-nowrap outline-default bg-transparent;
33+
@apply relative text-center text-nowrap outline-default bg-transparent no-drag;
3434
color: var(--font-color);
3535
fill: var(--font-color);
3636
font-size: 1em;
3737
height: var(--button-size);
3838
line-height: var(--button-size);
39-
-webkit-app-region: no-drag;
4039

4140
&:hover {
4241
@apply overlay;

src/renderer/menubar/styles.css

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,25 @@
33
}
44

55
.menubar-trigger {
6-
@apply px-3 py-1.5 flex rounded-sm;
7-
outline: none;
8-
user-select: none;
9-
line-height: 1;
10-
color: var(--font-color);
11-
align-items: center;
12-
justify-content: space-between;
6+
@apply px-3 py-1.5 flex rounded-sm outline-none select-none items-center leading-none;
137

148
&[data-highlighted],
159
&[data-state='open'] {
16-
background-color: var(--overlay);
10+
@apply overlay;
1711
}
1812

1913
&:hover,
2014
&:focus {
21-
color: var(--font-color-active);
22-
background-color: var(--overlay);
15+
@apply text-active overlay;
2316
}
2417
}
2518

2619
.menu-content,
2720
.menu-sub-content {
28-
@apply bg-secondary drop-shadow-lg p-1 z-10 rounded-sm;
21+
@apply bg-secondary drop-shadow-lg p-1 z-10 rounded-sm no-drag;
2922
min-width: 200px;
3023
will-change: transform, opacity;
3124
border: 1px solid var(--border-color);
32-
-webkit-app-region: no-drag;
3325
}
3426

3527
.menu-item,

src/renderer/utilities.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
-webkit-app-region: drag;
2323
}
2424

25+
@utility no-drag {
26+
-webkit-app-region: no-drag;
27+
}
28+
2529
@utility overlay {
2630
background-color: var(--overlay);
2731
}

src/renderer/window/views.cljs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,14 @@
5555
:style {:z-index -1}}
5656
@(rf/subscribe [::document.subs/title-bar])]
5757
[:div.flex.h-full.flex-1.drag]
58-
[button {:action [::theme.events/cycle-mode]
59-
:title (str "Theme mode - " theme-mode)
60-
:icon theme-mode
61-
:class "bg-primary"}]
62-
(when (and electron? (not fullscreen?) (not mac?))
63-
(into [:div.text-right]
64-
(map button (window-control-buttons maximized?))))
65-
(when fullscreen?
66-
[button {:action [::window.events/toggle-fullscreen]
67-
:icon "arrow-minimize"}])]))
58+
[:div.flex
59+
[button {:action [::theme.events/cycle-mode]
60+
:title (str "Theme mode - " theme-mode)
61+
:icon theme-mode
62+
:class "bg-primary"}]
63+
(when (and electron? (not fullscreen?) (not mac?))
64+
(into [:div.flex]
65+
(map button (window-control-buttons maximized?))))
66+
(when fullscreen?
67+
[button {:action [::window.events/toggle-fullscreen]
68+
:icon "arrow-minimize"}])]]))

0 commit comments

Comments
 (0)