@@ -85,10 +85,8 @@ namespace jorts {
8585 }
8686
8787 // add required base classes
88- // this.get_style_context().add_class(this.uid.to_string ());
8988 this . get_style_context(). add_class(" rounded" );
90- this . get_style_context(). add_class(" default-decoration" );
91- this . get_style_context(). add_class(" jorts-window" );
89+
9290 this . uid = uid_counter++ ;
9391
9492 // Rebuild the whole theming
@@ -99,7 +97,7 @@ namespace jorts {
9997 // Define the header
10098 header = new Gtk .HeaderBar ();
10199 header. get_style_context (). add_class (Gtk . STYLE_CLASS_FLAT );
102- header. get_style_context(). add_class(" jorts-title" );
100+ // header.get_style_context().add_class("jorts-title");
103101 header. has_subtitle = false ;
104102 header. set_show_close_button (true );
105103 header. decoration_layout = " close:" ;
@@ -113,7 +111,7 @@ namespace jorts {
113111
114112 // Bar at the bottom
115113 actionbar = new Gtk .ActionBar ();
116- actionbar. get_style_context(). add_class(" jorts-bar " );
114+ actionbar. get_style_context(). add_class(" actionbar " );
117115 create_actionbar ();
118116 create_app_menu ();
119117
@@ -188,8 +186,16 @@ namespace jorts {
188186
189187 // Save everything
190188 private void update_storage () {
189+ int width, height;
190+
191191 get_storage_note();
192192 ((Application )this . application). update_storage();
193+
194+ this . get_size (out width, out height);
195+
196+ var everythingnote = new noteData(this . uid, this . title, this . theme, this . content, 0 , width, height);
197+
198+ save_to_stash(everythingnote);
193199 }
194200
195201
@@ -292,7 +298,7 @@ namespace jorts {
292298 color_button_bubblegum. width_request = 24 ;
293299 color_button_bubblegum. tooltip_text = _(" Bubblegum" );
294300
295- var color_button_bubblegum_context = color_button_blueberry . get_style_context ();
301+ var color_button_bubblegum_context = color_button_bubblegum . get_style_context ();
296302 color_button_bubblegum_context. add_class (" color-button" );
297303 color_button_bubblegum_context. add_class (" bubblegum" );
298304
@@ -350,6 +356,7 @@ namespace jorts {
350356 color_button_box. pack_start (color_button_banana, false , true , 0 );
351357 color_button_box. pack_start (color_button_lime, false , true , 0 );
352358 color_button_box. pack_start (color_button_blueberry, false , true , 0 );
359+ color_button_box. pack_start (color_button_bubblegum, false , true , 0 );
353360 color_button_box. pack_start (color_button_grape, false , true , 0 );
354361 color_button_box. pack_start (color_button_cocoa, false , true , 0 );
355362 color_button_box. pack_start (color_button_silver, false , true , 0 );
@@ -518,13 +525,6 @@ namespace jorts {
518525 }
519526
520527
521-
522-
523-
524- // TODO: A theming service or something. Something cleaner than this in all cases
525- // Basically the menu button defines two public variables
526- // And then this reconstructs a whole ass theme out of these two
527- // Either it can be a service, or just all defined in CSS and add/remove css
528528 private void update_theme(string theme) {
529529
530530 // in GTK4 we can replace this with setting css_classes
0 commit comments