Skip to content

Commit

Permalink
3.5.5 - Fix slowndowns when resizing, minor other fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Lains committed Apr 26, 2021
1 parent d876e70 commit 60c47fb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 24 deletions.
10 changes: 0 additions & 10 deletions data/io.github.lainsce.Khronos.gschema.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
<schemalist>
<schema id="io.github.lainsce.Khronos" path="/io/github/lainsce/Khronos/">
<key name="window-height" type="i">
<default>700</default>
<summary>Window position</summary>
<description>The height of the window</description>
</key>
<key name="window-width" type="i">
<default>800</default>
<summary>Window position</summary>
<description>The width of the window</description>
</key>
<key name="notification-delay" type="i">
<default>1800</default>
<summary>Delay between notifications</summary>
Expand Down
1 change: 0 additions & 1 deletion data/stylesheet.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.kh-title {
font-size: 50px;
font-weight: 300;
padding-top: 24px;
}

.kh-row {
Expand Down
6 changes: 1 addition & 5 deletions data/ui/main_window.ui
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,8 @@
<object class="GtkBox">
<property name="halign">center</property>
<property name="valign">center</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<property name="margin-top">12</property>
<property name="margin-bottom">12</property>
<property name="orientation">vertical</property>
<property name="spacing">24</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="column_time_label">
<property name="use-markup">1</property>
Expand Down
11 changes: 3 additions & 8 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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 ("<span font_features='tnum'>%02u%02u%02u</span>".printf(hrs, min, sec));
Expand Down Expand Up @@ -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);

Expand All @@ -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);
}
Expand Down

0 comments on commit 60c47fb

Please sign in to comment.