File tree Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ A simple focus timer app.
1818## ⚡️ Requirements
1919
2020- elementary OS 7.0 or later
21+ - Granite 7.2.0 or later
2122- GTK 4.0 or later
2223- libadwaita 1.0 or later
2324
Original file line number Diff line number Diff line change @@ -16,6 +16,15 @@ public class Pomerode.Application : Adw.Application {
1616 this . set_accels_for_action (" app.quit" , {" <primary>q" });
1717 }
1818
19+ protected override void startup () {
20+ // Make sure to use elementary stylesheet on Pantheon
21+ if (Util . is_on_pantheon ()) {
22+ Granite . init ();
23+ }
24+
25+ base . startup ();
26+ }
27+
1928 public override void activate () {
2029 base . activate ();
2130 var win = this . active_window ?? new Pomerode .Window (this );
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ pomerode_vala_sources = files(
2222 ' main.vala' ,
2323 ' application.vala' ,
2424 ' preferences.vala' ,
25+ ' util.vala' ,
2526 ' window.vala'
2627)
2728
@@ -34,6 +35,7 @@ pomerode_sources = [
3435
3536pomerode_dependencies = [
3637 dependency (' gtk4' ),
38+ dependency (' granite-7' , version : ' >= 7.2.0' ),
3739 dependency (' libadwaita-1' ),
3840 dependency (' glib-2.0' ),
3941 dependency (' gobject-2.0' ),
Original file line number Diff line number Diff line change 1+ namespace Util {
2+ /**
3+ * Whether the app is running on Pantheon desktop environment.
4+ */
5+ public static bool is_on_pantheon () {
6+ return Environment . get_variable (" XDG_CURRENT_DESKTOP" ) == " Pantheon" ;
7+ }
8+ }
You can’t perform that action at this time.
0 commit comments