highlight text that has tooltips. add tooltips to some icon buttons

master
itwrx 1 year ago
parent e153fb015f
commit 3c0a8afe80
  1. 11
      views/routine_editor.nim
  2. 2
      views/routine_list.nim

@ -44,7 +44,8 @@ method view(editor: RoutineEditorState): Widget {.locks: "unknown".} =
#later, this may be "selected by default?", instead. #later, this may be "selected by default?", instead.
#"selected" checkboxes wiould be added to the list view. #"selected" checkboxes wiould be added to the list view.
#to allow the user to select which routines are used for a given run. #to allow the user to select which routines are used for a given run.
text = "<span weight=\"bold\">Enabled?</span>" text = "<span weight=\"bold\" color=\"#FFF469\">Enabled?</span>"
tooltip = "Should this Routine be enabled for inclusion in the Bkup run?"
xAlign = 0 xAlign = 0
useMarkup = true useMarkup = true
Switch {.expand: false.}: Switch {.expand: false.}:
@ -54,7 +55,8 @@ method view(editor: RoutineEditorState): Widget {.locks: "unknown".} =
if not editor.changed.isNil: if not editor.changed.isNil:
editor.changed.callback(editor.routine) editor.changed.callback(editor.routine)
Label {.expand: false.}: Label {.expand: false.}:
text = "<span weight=\"bold\">Sources:</span>" text = "<span weight=\"bold\" color=\"#FFF469\">Sources:</span>"
tooltip = "The file(s) or folder(s) you want to backup when this Routine is run."
xAlign = 0 xAlign = 0
useMarkup = true useMarkup = true
Box {.expand: false.}: Box {.expand: false.}:
@ -150,12 +152,14 @@ method view(editor: RoutineEditorState): Widget {.locks: "unknown".} =
xAlign = 0 xAlign = 0
Button {.expand: false.}: Button {.expand: false.}:
icon = "user-trash-symbolic" icon = "user-trash-symbolic"
tooltip = "Delete this Source. Warning: will not ask you to confirm."
proc clicked() = proc clicked() =
editor.routine.sources.delete(it) editor.routine.sources.delete(it)
if not editor.changed.isNil: if not editor.changed.isNil:
editor.changed.callback(editor.routine) editor.changed.callback(editor.routine)
Label {.expand: false.}: Label {.expand: false.}:
text = "<span weight=\"bold\">Destinations:</span>" text = "<span weight=\"bold\" color=\"#FFF469\">Destinations:</span>"
tooltip = "The folder(s) or drive(s) you want to backup this Routine's Sources to."
xAlign = 0 xAlign = 0
useMarkup = true useMarkup = true
Box {.expand: false.}: Box {.expand: false.}:
@ -213,6 +217,7 @@ method view(editor: RoutineEditorState): Widget {.locks: "unknown".} =
xAlign = 0 xAlign = 0
Button {.expand: false.}: Button {.expand: false.}:
icon = "user-trash-symbolic" icon = "user-trash-symbolic"
tooltip = "Delete this Destination. Warning: will not ask you to confirm."
proc clicked() = proc clicked() =
editor.routine.destinations.delete(it) editor.routine.destinations.delete(it)
if not editor.changed.isNil: if not editor.changed.isNil:

@ -39,6 +39,7 @@ method view(list: RoutineListState): Widget {.locks: "unknown".} =
Button {.expand: false.}: Button {.expand: false.}:
#icon = "entity-edit" #icon = "entity-edit"
icon = "entity-edit-dark-theme" icon = "entity-edit-dark-theme"
tooltip = "Edit this Routine."
proc clicked() = proc clicked() =
## Opens the EditRoutineDialog for updating the existing routine ## Opens the EditRoutineDialog for updating the existing routine
let (res, state) = list.app.open: gui: let (res, state) = list.app.open: gui:
@ -51,6 +52,7 @@ method view(list: RoutineListState): Widget {.locks: "unknown".} =
# Delete Button # Delete Button
Button {.expand: false.}: Button {.expand: false.}:
icon = "user-trash-symbolic" icon = "user-trash-symbolic"
tooltip = "Delete this Routine. Warning: will not ask you to confirm."
proc clicked() = proc clicked() =
list.routineModel.delete(routine.id) list.routineModel.delete(routine.id)
if routine.selByDef: if routine.selByDef:

Loading…
Cancel
Save