Skip to content

Commit

Permalink
Added resizable property to window allowing for fixed sized windows w…
Browse files Browse the repository at this point in the history
…hich also forces floating in most tiling managers.
  • Loading branch information
beef331 committed Sep 16, 2024
1 parent 978c6b8 commit a72767a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions owlkettle/bindings/gtk.nim
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,8 @@ proc gtk_window_new*(windowType: GtkWindowType): GtkWidget
proc gtk_window_set_title*(window: GtkWidget, title: cstring)
proc gtk_window_set_titlebar*(window, titlebar: GtkWidget)
proc gtk_window_set_default_size*(window: GtkWidget, width, height: cint)
proc gtk_window_set_resizable*(window: GtkWidget, resizable: bool)
proc gtk_window_get_resizable*(window: GtkWidget): bool
proc gtk_window_set_transient_for*(window, parent: GtkWidget)
proc gtk_window_set_modal*(window: GtkWidget, modal: cbool)
proc gtk_window_set_focus*(window, focus: GtkWidget)
Expand Down
5 changes: 5 additions & 0 deletions owlkettle/widgets.nim
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,15 @@ renderable Window of BaseWindow:
title: string
titlebar: Widget ## Custom widget set as the titlebar of the window
child: Widget
resizable: bool

hooks:
beforeBuild:
state.internalWidget = gtk_window_new(GTK_WINDOW_TOPLEVEL)

hooks resizable:
property:
gtk_window_set_resizable(state.internalWidget, state.resizable)

hooks title:
property:
Expand Down

0 comments on commit a72767a

Please sign in to comment.