Skip to content

Commit

Permalink
4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lainsce committed Sep 20, 2023
1 parent 764d998 commit 8de097e
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 14 deletions.
Binary file modified data/shot-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.
4 changes: 2 additions & 2 deletions data/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
}

.kh-title {
font-size: 4rem;
font-size: 400%;
font-weight: 300;
}

Expand All @@ -14,6 +14,6 @@

.kh-tag {
background: alpha(@view_fg_color, 0.1);
border-radius: 12px;
border-radius: 8px;
padding: 4px 12px;
}
4 changes: 2 additions & 2 deletions data/ui/main_window.ui
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
</menu>
<template class="KhronosMainWindow" parent="AdwApplicationWindow">
<property name="width-request">360</property>
<property name="height-request">360</property>
<property name="height-request">500</property>
<child>
<object class="AdwBreakpoint">
<condition>max-width: 550sp</condition>
<condition>max-width: 500sp</condition>
<setter object="switcher_bar" property="reveal">True</setter>
<setter object="timer_header" property="title-widget"/>
</object>
Expand Down
13 changes: 10 additions & 3 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@ namespace Khronos {
});
timer_button.icon_name = "media-playback-pause-symbolic";
timer_button.tooltip_text = _("Pauses the timer for a log");
timer_button.get_style_context ().add_class ("destructive-action");
timer_button.add_css_class ("destructive-action");
add_log_button.sensitive = false;
stop_timer_button.visible = true;
reset_button.visible = true;
reset_button.visible = false;

column_entry.visible = false;
column_tag_entry.visible = false;
Expand Down Expand Up @@ -190,6 +190,7 @@ namespace Khronos {
add_log_button.sensitive = true;
stop_timer_button.sensitive = true;
reset_button.sensitive = true;
reset_button.visible = true;
}
});

Expand Down Expand Up @@ -295,12 +296,18 @@ namespace Khronos {
[GtkCallback]
public void on_log_removal_requested (Log log) {
view_model.delete_log (log);

uint num = view_model.logs.get_n_items ();
event_searchbar.placeholder_text = num.to_string() + " " + (_("events"));
}

[GtkCallback]
public void on_logs_removal_requested (Gtk.Button button) {
view_model.delete_trash (this);
view_model.delete_trash.begin (this);
trash_button.sensitive = false;

uint num = view_model.logs.get_n_items ();
event_searchbar.placeholder_text = num.to_string() + " " + (_("events"));
}

public void action_export () {
Expand Down
12 changes: 6 additions & 6 deletions src/Widgets/LogRowContent.vala
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ public class Khronos.LogRowContent : Adw.Bin {
_log = value;

text_binding = _log?.bind_property (
"name", row, "title", SYNC_CREATE|BIDIRECTIONAL);
"name", row, "title", SYNC_CREATE | BIDIRECTIONAL);
text2_binding = _log?.bind_property (
"timedate", row, "subtitle", SYNC_CREATE|BIDIRECTIONAL);
"timedate", row, "subtitle", SYNC_CREATE | BIDIRECTIONAL);

string[] tags = _log.tags.split(":");
string[] tags = _log.tags.split (":");
foreach (var t in tags) {
var build = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0);
build.add_css_class ("kh-tag");
var tagobj = new Gtk.Label (t);
build.append(tagobj);
log_tag_holder.append(build);
build.append (tagobj);
log_tag_holder.append (build);
}
}
}
Expand All @@ -62,6 +62,6 @@ public class Khronos.LogRowContent : Adw.Bin {

[GtkCallback]
void on_delete_button_clicked () {
((LogListView)MiscUtils.find_ancestor_of_type<LogListView>(this)).log_removal_requested (log);
((LogListView) MiscUtils.find_ancestor_of_type<LogListView> (this)).log_removal_requested (log);
}
}
2 changes: 1 addition & 1 deletion src/Widgets/TagHolder.vala
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class Khronos.TagHolder : Gtk.Widget {

public void append (Gtk.Widget child) {
child.set_parent (this);
children.append(child);
children.append (child);
}

public override void dispose () {
Expand Down

0 comments on commit 8de097e

Please sign in to comment.