From 60c47fb4813b08b23e0287be70f6377edf0a86da Mon Sep 17 00:00:00 2001 From: Lains Date: Mon, 26 Apr 2021 20:07:59 -0300 Subject: [PATCH] 3.5.5 - Fix slowndowns when resizing, minor other fixes --- data/io.github.lainsce.Khronos.gschema.xml | 10 ---------- data/stylesheet.css | 1 - data/ui/main_window.ui | 6 +----- src/MainWindow.vala | 11 +++-------- 4 files changed, 4 insertions(+), 24 deletions(-) diff --git a/data/io.github.lainsce.Khronos.gschema.xml b/data/io.github.lainsce.Khronos.gschema.xml index 8fe46e6..6109214 100644 --- a/data/io.github.lainsce.Khronos.gschema.xml +++ b/data/io.github.lainsce.Khronos.gschema.xml @@ -1,15 +1,5 @@ - - 700 - Window position - The height of the window - - - 800 - Window position - The width of the window - 1800 Delay between notifications diff --git a/data/stylesheet.css b/data/stylesheet.css index e21ff2a..d715741 100644 --- a/data/stylesheet.css +++ b/data/stylesheet.css @@ -1,7 +1,6 @@ .kh-title { font-size: 50px; font-weight: 300; - padding-top: 24px; } .kh-row { diff --git a/data/ui/main_window.ui b/data/ui/main_window.ui index 7016c28..5a9315f 100644 --- a/data/ui/main_window.ui +++ b/data/ui/main_window.ui @@ -91,12 +91,8 @@ center center - 12 - 12 - 12 - 12 vertical - 24 + 12 1 diff --git a/src/MainWindow.vala b/src/MainWindow.vala index d082fe8..44a7e84 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -138,6 +138,8 @@ namespace Khronos { liststore = new GLib.ListStore (typeof (Log)); + column.bind_model (liststore, item => make_widgets (item)); + placeholder.set_visible (false); column_time_label.set_label ("%02u∶%02u∶%02u".printf(hrs, min, sec)); @@ -310,12 +312,11 @@ namespace Khronos { tm.load_from_file (); - this.set_size_request (300, 360); + this.set_size_request (360, 360); this.show (); this.present (); set_timeouts (); - listen_to_changes (); liststore.items_changed.connect (() => { tm.save_to_file (liststore); @@ -332,12 +333,6 @@ namespace Khronos { return true; } - public void listen_to_changes () { - column.bind_model (liststore, item => make_widgets (item)); - Khronos.Application.gsettings.bind ("window-width", this, "default-width", GLib.SettingsBindFlags.DEFAULT); - Khronos.Application.gsettings.bind ("window-height", this, "default-height", GLib.SettingsBindFlags.DEFAULT); - } - public LogRow make_widgets (GLib.Object item) { return new LogRow ((Log) item); }