Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jovanlanik committed Oct 21, 2024
1 parent e1ba618 commit 66321fb
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 11 deletions.
2 changes: 2 additions & 0 deletions include/window.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ struct Window {
GtkWidget *unlock_button;
GtkWidget *error_label;
GtkWidget *warning_label;
GtkWidget *info_box;
GtkWidget *time_box;
GtkWidget *clock_label;
GtkWidget *date_label;

Expand Down
35 changes: 24 additions & 11 deletions res/gtklock.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,32 @@
<property name="halign">center</property>
<property name="valign">center</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<property name="spacing">10</property>
<child>
<object class="GtkLabel" id="clock-label">
<property name="name">clock-label</property>
<object class="GtkBox" id="info-box">
<property name="name">info-box</property>
<property name="halign">center</property>
<property name="margin-bottom">0</property>
</object>
</child>
<child>
<object class="GtkLabel" id="date-label">
<property name="name">date-label</property>
<property name="halign">center</property>
<property name="margin-bottom">10</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkBox" id="time-box">
<property name="name">time-box</property>
<property name="halign">center</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="clock-label">
<property name="name">clock-label</property>
<property name="halign">center</property>
</object>
</child>
<child>
<object class="GtkLabel" id="date-label">
<property name="name">date-label</property>
<property name="halign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
Expand Down
3 changes: 3 additions & 0 deletions src/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,9 @@ struct Window *create_window(GdkMonitor *monitor) {
w->unlock_button = GTK_WIDGET(gtk_builder_get_object(builder, "unlock-button"));
w->error_label = GTK_WIDGET(gtk_builder_get_object(builder, "error-label"));
w->warning_label = GTK_WIDGET(gtk_builder_get_object(builder, "warning-label"));

w->info_box = GTK_WIDGET(gtk_builder_get_object(builder, "info-box"));
w->time_box = GTK_WIDGET(gtk_builder_get_object(builder, "time-box"));

w->clock_label = GTK_WIDGET(gtk_builder_get_object(builder, "clock-label"));
window_update_clock(w);
Expand Down

0 comments on commit 66321fb

Please sign in to comment.