Skip to content

Commit

Permalink
refactor: simplify css
Browse files Browse the repository at this point in the history
  • Loading branch information
SeaDve committed Jul 20, 2024
1 parent 6e86b5b commit 7fd6d89
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 18 deletions.
15 changes: 0 additions & 15 deletions data/ui/style.css
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
.main-button {
transition: 200ms ease-in-out;
font-weight: bold;
}

overlay > image {
color: @accent_bg_color;
}

.playing {
color: @theme_fg_color;
background-color: @theme_bg_color;
box-shadow: 0 0 6px 0 @theme_fg_color;
}

.enlarge1 {
transition: 2.3s ease-in-out;
-gtk-icon-size: 110px;
Expand Down
10 changes: 9 additions & 1 deletion data/ui/window.ui
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,27 @@
<object class="GtkImage" id="circle1">
<property name="valign">center</property>
<property name="icon-name">circle-symbolic</property>
<style>
<class name="accent"/>
</style>
</object>
</child>
<child type="overlay">
<object class="GtkImage" id="circle2">
<property name="valign">center</property>
<property name="icon-name">circle-symbolic</property>
<style>
<class name="accent"/>
</style>
</object>
</child>
<child type="overlay">
<object class="GtkImage" id="circle3">
<property name="valign">center</property>
<property name="icon-name">circle-symbolic</property>
<style>
<class name="accent"/>
</style>
</object>
</child>
<child type="overlay">
Expand Down Expand Up @@ -79,7 +88,6 @@
<property name="action-name">app.toggle-breathing</property>
<style>
<class name="circular"/>
<class name="main-button"/>
<class name="suggested-action"/>
</style>
<child>
Expand Down
4 changes: 2 additions & 2 deletions src/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ def _clean_circles(self):
def set_button_play_mode(self, is_play):
if is_play:
self.main_button.remove_css_class("suggested-action")
self.main_button.add_css_class("playing")
self.main_button.add_css_class("opaque")
else:
self.main_button.add_css_class("suggested-action")
self.main_button.remove_css_class("playing")
self.main_button.remove_css_class("opaque")

def toggle_breathing(self):
if self.timer.time == 0:
Expand Down

0 comments on commit 7fd6d89

Please sign in to comment.