# HG changeset patch
# User Olaf Wintermann <olaf.wintermann@gmail.com>
# Date 1743322467 -7200
# Node ID 9068a5c7caf69481551d40407dc01b2bac57b384
# Parent  7992a44fe71923712a3130ba0639276b6a174a4f
add separator widget (GTK)

diff -r 7992a44fe719 -r 9068a5c7caf6 ui/gtk/widget.c
--- a/ui/gtk/widget.c	Sat Mar 29 20:03:25 2025 +0100
+++ b/ui/gtk/widget.c	Sun Mar 30 10:14:27 2025 +0200
@@ -41,3 +41,16 @@
     
     return widget;
 }
+
+UIWIDGET ui_separator_create(UiObject *obj, UiWidgetArgs *args) {
+    UiObject* current = uic_current_obj(obj);
+    GtkWidget *widget = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
+    ui_set_name_and_style(widget, args.name, args.style_class);
+    UI_APPLY_LAYOUT1(current, args);
+    current->container->add(current->container, widget, FALSE);
+    return widget;
+}
+
+void ui_widget_set_size(UIWIDGET w, int width, int height) {
+    gtk_widget_set_size_request(w, width, height);
+}
diff -r 7992a44fe719 -r 9068a5c7caf6 ui/ui/widget.h
--- a/ui/ui/widget.h	Sat Mar 29 20:03:25 2025 +0100
+++ b/ui/ui/widget.h	Sun Mar 30 10:14:27 2025 +0200
@@ -69,6 +69,8 @@
 
 #define ui_separator(obj, ...) ui_separator_create(obj, &(UiWidgetArgs){ __VA_ARGS__ } )
 
+UIEXPORT void ui_widget_set_size(UIWIDGET w, int width, int height);
+
 
 #ifdef __cplusplus
 }