Skip to content

Commit

Permalink
can-lehmann#83 Add widgets example
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippMDoerner committed Sep 29, 2023
1 parent 2a2ad27 commit 61e0f20
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions owlkettle/widgets.nim
Original file line number Diff line number Diff line change
Expand Up @@ -3508,6 +3508,18 @@ renderable Scale of BaseWidget:
property:
gtk_scale_set_value_pos(state.internalWidget, state.valuePosition.toGtk())

example:
Scale:
showFillLevel = false
min = 0
max = 1
marks = @[some("Just a mark"), ScaleLeft, 0.5]
inverted = true
showValue = false

proc valueChanged(newValue: float) =
echo "New value is ", newValue

export BaseWidget, BaseWidgetState, BaseWindow, BaseWindowState
export Window, Box, Overlay, Label, Icon, Picture, Button, HeaderBar, ScrolledWindow, Entry, Spinner
export SpinButton, Paned, ColorButton, Switch, LinkButton, ToggleButton, CheckButton, RadioGroup
Expand Down

0 comments on commit 61e0f20

Please sign in to comment.