Skip to content

Commit 00eb38f

Browse files
committed
skip the on focus gtk settings bullshit
1 parent e1d26a2 commit 00eb38f

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed

src/Windows/PreferenceWindow.vala

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,7 @@ public class Jorts.PreferenceWindow : Gtk.ApplicationWindow {
2323
Intl.setlocale ();
2424

2525
application = app;
26-
var gtk_settings = Gtk.Settings.get_default ();
27-
28-
// Since each sticky note adopts a different accent color
29-
// we have to revert to default when this one is focused
30-
this.notify["is-active"].connect (() => {
31-
if (this.is_active) {
32-
gtk_settings.gtk_theme_name = "io.elementary.stylesheet.blueberry";
33-
}
34-
});
26+
3527

3628
/********************************************/
3729
/* HEADERBAR BS */

src/Windows/StickyNoteWindow.vala

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* Reports to the NoteManager for saving
1515
*/
1616
public class Jorts.StickyNoteWindow : Gtk.ApplicationWindow {
17-
public Gtk.Settings gtk_settings;
1817

1918
public Jorts.NoteView view;
2019
public PopoverView popover;
@@ -83,8 +82,6 @@ public class Jorts.StickyNoteWindow : Gtk.ApplicationWindow {
8382
actions.add_action_entries (ACTION_ENTRIES, this);
8483
insert_action_group ("app", actions);
8584

86-
gtk_settings = Gtk.Settings.get_default ();
87-
8885
add_css_class ("rounded");
8986
title = "" + _(" - Jorts");
9087

@@ -124,9 +121,6 @@ public class Jorts.StickyNoteWindow : Gtk.ApplicationWindow {
124121
view.textview.buffer.changed.connect (has_changed);
125122
popover.zoom_changed.connect (zoomcontroller.zoom_changed);
126123

127-
// Use the color theme of this sticky note when focused
128-
this.notify["is-active"].connect (on_focus_changed);
129-
130124
// Respect animation settings for showing ui elements
131125
if (Gtk.Settings.get_default ().gtk_enable_animations && (!Application.gsettings.get_boolean ("hide-bar"))) {
132126
show.connect_after (delayed_show);
@@ -168,19 +162,6 @@ public class Jorts.StickyNoteWindow : Gtk.ApplicationWindow {
168162
changed ();
169163
}
170164

171-
/**
172-
* Changes the stylesheet accents to the notes color
173-
* Add or remove the Redacted font if the setting is active
174-
*/
175-
private void on_focus_changed () {
176-
debug ("Focus changed!");
177-
178-
if (this.is_active) {
179-
var stylesheet = "io.elementary.stylesheet." + popover.color.to_string ().ascii_down ();
180-
gtk_settings.gtk_theme_name = stylesheet;
181-
}
182-
}
183-
184165
/**
185166
* Package the note into a NoteData and pass it back.
186167
* Used by NoteManager to pass all informations conveniently for storage

0 commit comments

Comments
 (0)