From 3c0a8afe808ca4b600461d086ff2503d1151239f Mon Sep 17 00:00:00 2001 From: itwrx Date: Mon, 26 Jun 2023 13:14:13 -0500 Subject: [PATCH] highlight text that has tooltips. add tooltips to some icon buttons --- views/routine_editor.nim | 15 ++++++++++----- views/routine_list.nim | 6 ++++-- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/views/routine_editor.nim b/views/routine_editor.nim index d8e86bd..1980f7f 100644 --- a/views/routine_editor.nim +++ b/views/routine_editor.nim @@ -44,7 +44,8 @@ method view(editor: RoutineEditorState): Widget {.locks: "unknown".} = #later, this may be "selected by default?", instead. #"selected" checkboxes wiould be added to the list view. #to allow the user to select which routines are used for a given run. - text = "Enabled?" + text = "Enabled?" + tooltip = "Should this Routine be enabled for inclusion in the Bkup run?" xAlign = 0 useMarkup = true Switch {.expand: false.}: @@ -54,7 +55,8 @@ method view(editor: RoutineEditorState): Widget {.locks: "unknown".} = if not editor.changed.isNil: editor.changed.callback(editor.routine) Label {.expand: false.}: - text = "Sources:" + text = "Sources:" + tooltip = "The file(s) or folder(s) you want to backup when this Routine is run." xAlign = 0 useMarkup = true Box {.expand: false.}: @@ -149,13 +151,15 @@ method view(editor: RoutineEditorState): Widget {.locks: "unknown".} = text = routineSource xAlign = 0 Button {.expand: false.}: - icon = "user-trash-symbolic" + icon = "user-trash-symbolic" + tooltip = "Delete this Source. Warning: will not ask you to confirm." proc clicked() = editor.routine.sources.delete(it) if not editor.changed.isNil: editor.changed.callback(editor.routine) Label {.expand: false.}: - text = "Destinations:" + text = "Destinations:" + tooltip = "The folder(s) or drive(s) you want to backup this Routine's Sources to." xAlign = 0 useMarkup = true Box {.expand: false.}: @@ -212,7 +216,8 @@ method view(editor: RoutineEditorState): Widget {.locks: "unknown".} = text = routineDestination xAlign = 0 Button {.expand: false.}: - icon = "user-trash-symbolic" + icon = "user-trash-symbolic" + tooltip = "Delete this Destination. Warning: will not ask you to confirm." proc clicked() = editor.routine.destinations.delete(it) if not editor.changed.isNil: diff --git a/views/routine_list.nim b/views/routine_list.nim index 7d8370a..7771f3d 100644 --- a/views/routine_list.nim +++ b/views/routine_list.nim @@ -38,7 +38,8 @@ method view(list: RoutineListState): Widget {.locks: "unknown".} = # Edit Button Button {.expand: false.}: #icon = "entity-edit" - icon = "entity-edit-dark-theme" + icon = "entity-edit-dark-theme" + tooltip = "Edit this Routine." proc clicked() = ## Opens the EditRoutineDialog for updating the existing routine let (res, state) = list.app.open: gui: @@ -50,7 +51,8 @@ method view(list: RoutineListState): Widget {.locks: "unknown".} = list.routineModel.update(EditRoutineDialogState(state).routine) # Delete Button Button {.expand: false.}: - icon = "user-trash-symbolic" + icon = "user-trash-symbolic" + tooltip = "Delete this Routine. Warning: will not ask you to confirm." proc clicked() = list.routineModel.delete(routine.id) if routine.selByDef: