-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d9870a1
commit 5ae9547
Showing
16 changed files
with
68 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
*~ | ||
build | ||
build-dir | ||
.flatpak-builder |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
app-id: com.github.manexim.insomnia | ||
runtime: io.elementary.Platform | ||
runtime-version: '6' | ||
sdk: io.elementary.Sdk | ||
command: com.github.manexim.insomnia | ||
finish-args: | ||
- '--share=ipc' | ||
- '--socket=fallback-x11' | ||
- '--socket=wayland' | ||
|
||
# needed for perfers-color-scheme | ||
- '--system-talk-name=org.freedesktop.Accounts' | ||
|
||
# needed for inhibitor | ||
- '--talk-name=org.freedesktop.ScreenSaver' | ||
modules: | ||
- name: insomnia | ||
buildsystem: meson | ||
sources: | ||
- type: dir | ||
path: . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,8 +19,8 @@ | |
* Authored by: Marius Meisenzahl <[email protected]> | ||
*/ | ||
|
||
public class Insomnia.MainWindow : Gtk.ApplicationWindow { | ||
private Gtk.HeaderBar headerbar; | ||
public class Insomnia.MainWindow : Hdy.Window { | ||
private Hdy.HeaderBar headerbar; | ||
private Gtk.Label title_label; | ||
|
||
private bool timer_started; | ||
|
@@ -38,12 +38,13 @@ public class Insomnia.MainWindow : Gtk.ApplicationWindow { | |
} | ||
|
||
construct { | ||
get_style_context ().add_class ("rounded"); | ||
Hdy.init (); | ||
|
||
headerbar = new Gtk.HeaderBar () { | ||
show_close_button = true | ||
headerbar = new Hdy.HeaderBar () { | ||
decoration_layout = "close:", | ||
show_close_button = true, | ||
title = Constants.APP_NAME | ||
}; | ||
headerbar.get_style_context ().add_class ("default-decoration"); | ||
|
||
var menu_widget = new Gtk.Grid () { | ||
orientation = Gtk.Orientation.VERTICAL, | ||
|
@@ -113,11 +114,11 @@ public class Insomnia.MainWindow : Gtk.ApplicationWindow { | |
|
||
headerbar.pack_end (app_menu); | ||
|
||
set_titlebar (headerbar); | ||
|
||
var grid = new Gtk.Grid () { | ||
halign = Gtk.Align.CENTER, | ||
valign = Gtk.Align.CENTER | ||
valign = Gtk.Align.CENTER, | ||
hexpand = true, | ||
vexpand = true | ||
}; | ||
|
||
title_label = new Gtk.Label ("") { | ||
|
@@ -127,7 +128,14 @@ public class Insomnia.MainWindow : Gtk.ApplicationWindow { | |
|
||
grid.add (title_label); | ||
|
||
add (grid); | ||
var main_layout = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); | ||
main_layout.add (headerbar); | ||
main_layout.add (grid); | ||
|
||
var window_handle = new Hdy.WindowHandle (); | ||
window_handle.add (main_layout); | ||
|
||
add (window_handle); | ||
} | ||
|
||
private void update () { | ||
|