Add tooltips to settings.#1521
Conversation
|
Any tooltips you would like to add or rephrase @m3nu? |
|
That is a good idea. Though I do look for tooltips in many application. The KDE HIG states:
However I do like the MacOS way of explaining a setting. I will look for a way to integrate this nicely into our app style. |
|
Yesss! That's exactly what I was thinking of. That's what I see on macOS and on the web sometimes. |
|
Still better than a normal tooltip. I use this on the web extensively. The (?) icon just shouldn't look like a button that can be clicked. A secondary label would be good too, but clutters the space more. |
You are right. I didn't notice that they were group aligned. |
5830f1d to
aae25b0
Compare
aae25b0 to
a64a4fc
Compare
|
Looks perfect! You'll have to show us how to use this tooltip elsewhere. I think it's real useful for explaining stuff behind complex options. |
It can be used like a normal widget. To add it to an existing ui element, y
Example: vorta/src/vorta/views/misc_tab.py Lines 88 to 94 in 391ad2a This still involves a few steps, I am interested in ideas for simplifying the steps needed to setup the button. I also tried to add the button to Qt Designer but didn't manage yet. |
* src/vorta/store/models.py (SettingsModel): Add `tooltip` column. * src/vorta/store/migrations.py (run_migrations): Create `tooltip` column. * src/vorta/store/connection.py (init_db): Populate `tooltip` column. Increase `SCHEMA_VERSION`. * src/vorta/views/misc_tab.py (MiscTab.populate): Set tooltip of checkbox widgets. * src/vorta/store/settings.py : Add tooltips and update label of `override_mount_permissions`
391ad2a to
abdc902
Compare
|
One small problem: The SVG needs |
abdc902 to
49ccf43
Compare
The css attribute should be sufficient.
I did forget to implement the code for updating the icon when the colour scheme changes but I don't think we have such a function -- we only have |
Yes, the minified version works well. I think Vorta is replaceing There is some code that refreshes the icons when changing color. It's probably not critical for just this tab. Maybe there is a simple way. |
49ccf43 to
297a41f
Compare
These help buttons show the corresponding tooltip when the mouse hovers over them. * src/vorta/assets/icons/help-about.svg: Add info icon. * src/vorta/views/partials/tooltip_button.py: Implement `ToolTipButton`. * src/vorta/views/misc_tab.py: Add `ToolTipButton` for each setting with a tooltip. Add `set_icons` and connect it to palette change. * tests/test_misc.py (test_autostart): Update test.
297a41f to
9420c77
Compare
|
Icons now change on palette change. |
m3nu
left a comment
There was a problem hiding this comment.
Looks good! This icon can be used in more places in the future. 👍
This adds tooltips to the settings as well as a 'info' button that shows the tooltip when hovering over it. * Add tooltips to settings. * src/vorta/store/models.py (SettingsModel): Add `tooltip` column. * src/vorta/store/migrations.py (run_migrations): Create `tooltip` column. * src/vorta/store/connection.py (init_db): Populate `tooltip` column. Increase `SCHEMA_VERSION`. * src/vorta/views/misc_tab.py (MiscTab.populate): Set tooltip of checkbox widgets. * src/vorta/store/settings.py : Add tooltips and update label of `override_mount_permissions` * Add *help* button to settings. * src/vorta/assets/icons/help-about.svg: Add info icon. * src/vorta/views/partials/tooltip_button.py: Implement `ToolTipButton`. * src/vorta/views/misc_tab.py: Add `ToolTipButton` for each setting with a tooltip. Add `set_icons` and connect it to palette change. * tests/test_misc.py (test_autostart): Update test. --------- Co-authored-by: real-yfprojects <real-yfprojects@users.noreply.github.com>






Fixes #1517
src/vorta/store/models.py (SettingsModel): Add
tooltipcolumn.src/vorta/store/migrations.py (run_migrations): Create
tooltipcolumn.src/vorta/store/connection.py (init_db): Populate
tooltipcolumn. IncreaseSCHEMA_VERSION.src/vorta/views/misc_tab.py (MiscTab.populate): Set tooltip of checkbox widgets.
src/vorta/store/settings.py : Add tooltips and update label of
override_mount_permissions