Skip to content

Commit

Permalink
* - use Adw.StyleManager to set color scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
Lains committed Sep 24, 2021
1 parent f7a6353 commit d445ad3
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion build-aux/flatpak/io.github.lainsce.DotMatrix.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"app-id" : "io.github.lainsce.DotMatrixDevel",
"runtime" : "org.gnome.Sdk",
"runtime-version" : "40",
"runtime-version" : "41",
"sdk" : "org.gnome.Sdk",
"command" : "io.github.lainsce.DotMatrix",
"rename-icon" : "io.github.lainsce.DotMatrixDevel",
Expand Down
14 changes: 7 additions & 7 deletions data/app.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
@define-color accent_color #66c7ae;
@define-color accent_bg_color #72dec2;
@define-color accent_fg black;

headerbar {
background-image: none;
background-color: @theme_bg_color;
.suggested-action label {
color: black;
}

headerbar.flat {
border-bottom: 1px solid @borders;
headerbar {
background: @theme_bg_color;
}

.suggested-action {
color: black;
.rotated {
transform: rotate(90deg);
}
2 changes: 1 addition & 1 deletion data/io.github.lainsce.DotMatrix.appdata.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<li>Select whetether to draw with lines or curves.</li>
<li>Quit anytime with the shortcut Ctrl + Q</li>
<li>Undo with the shortcut Ctrl + Z</li>
<li>Change line thickness by +5 or -5 with the respective shortcuts Ctrl + ) and Ctrl + (</li>
<li>Change line thickness by +5 or -5 with the respective shortcuts Ctrl + X and Ctrl + Shift + X</li>
</ul>
</description>
<provides>
Expand Down
Binary file modified data/shot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 1 addition & 4 deletions data/ui/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<object class="GtkButton" id="new_button">
<property name="receives-default">1</property>
<property name="tooltip-text" translatable="yes">New Glyph</property>
<property name="icon-name">document-new-symbolic</property>
<property name="icon-name">tab-new-symbolic</property>
<style>
<class name="image-button"/>
</style>
Expand All @@ -59,9 +59,6 @@
</style>
</object>
</child>
<style>
<class name="flat"/>
</style>
</object>
</child>
<child>
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project('io.github.lainsce.DotMatrix', ['vala', 'c'], version: '3.0.2')
project('io.github.lainsce.DotMatrix', ['vala', 'c'], version: '3.0.5')
gnome = import('gnome')
i18n = import('i18n')

Expand Down
3 changes: 3 additions & 0 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ namespace DotMatrix {
// Initial settings
Adw.init ();

var adwsm = Adw.StyleManager.get_default ();
adwsm.set_color_scheme (Adw.ColorScheme.PREFER_LIGHT);

var provider = new Gtk.CssProvider ();
provider.load_from_resource ("/io/github/lainsce/DotMatrix/app.css");
Gtk.StyleContext.add_provider_for_display (Gdk.Display.get_default (),
Expand Down

0 comments on commit d445ad3

Please sign in to comment.