-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
206 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,41 @@ | ||
--- | ||
type: docs | ||
--- | ||
|
||
# Objective | ||
|
||
Improve the quality of the painting experience in Artbox | ||
Improve the quality of the user interface in Artbox by providing configurable tooltips. | ||
|
||
## Related Links | ||
|
||
- Branches: Artbox and [feature-painttool](https://gitlab.gnome.org/pixelmixer/artbox/-/tree/feature-painttool?ref_type=heads) | ||
|
||
## Design Revisions | ||
|
||
| **Revision** | **Current Design** | **Issues** | **Changes** | | ||
|--------------------------------------------|---------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|-----------------------------------------------------------| | ||
| **1. Easy Cursor Location** | The Tool Cursor can be turned off in Preferences, and the pointer, leaving the only the brush outline. This is good, but causes issues. | A small and minimal cursor can be hard to locate | There is a minimum screen size for the cursor, and a small 'filled' 'contact' circle is always drawn | | ||
| **2. Indicate Erase Mode** | New Feature | It's not possible to tell if the paintbrush is about to erase whilst looking at the cursor | Detect the 'Eraser Tool' and 'Erase Paint' mode, change the cursor to a dashed circle | | ||
| **3. Simple Brush Boundary** | Image brushes are drawn as complex outlines based on the image | They can make a distracting paintbrush when the image is large and noisy | Draw a simple circular boundary if the 'Simple Brush Boundary' option is checked in the Paintbrush Options | | ||
| **Revision** | **Current Design** | **Issues** | **Changes** | | ||
|--------------------------|------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------| | ||
| **1. Configurable Tooltips** | Tooltip visibility is globally enabled or disabled by default | Users cannot selectively control tooltip visibility, which can lead to cluttered UIs or unclear tool guidance | Introduced a new configuration option, `show_tool_tips`, allowing users to toggle tooltips on or off in Preferences. | | ||
|
||
## MR Description | ||
|
||
This MR improves the painting experience by refining brush cursor behavior and adding new visual cues, with technical adjustments to enhance usability and provide better feedback during painting. | ||
This MR introduces a configuration option for tooltips in the Artbox GUI, allowing users to enable or disable tooltips according to their preference. The tooltip visibility applies to various UI components such as tool buttons and dock tabs, offering a customizable interface experience. | ||
|
||
### Changes | ||
|
||
1. **Easy Cursor Location**: | ||
- Introduced a new function `gimp_draw_brush_cursor` that ensures a minimum cursor size, even when the brush is very small or not visible (e.g., zero-pressure). | ||
- Defined constants `FINDER_SIZE` and `CORE_SIZE` to ensure a small 'filled' contact circle is always drawn, making the cursor easier to locate. | ||
- If the brush outline is too small, `should_locate` triggers a fallback locator circle. | ||
1. **Configurable Tooltip Property**: | ||
- Added a new `show_tool_tips` property in the `GimpGuiConfig` structure. | ||
- This property is defined in `gimpguiconfig.c` and `gimpguiconfig.h` and is registered in the `GimpGuiConfigClass` as a boolean preference, with an accessible blurb description for users. | ||
|
||
2. **Indicate Erase Mode**: | ||
- The new `gimp_is_erasing_paint` function detects when the user is in 'Eraser Tool' mode or the 'Erase Paint' blending mode. | ||
- When erasing is active, the cursor switches to a dashed circle by invoking `gimp_draw_arc_circle`, providing clear visual feedback. | ||
- A small filled circle is also drawn at the center to help users identify the brush's contact point. | ||
2. **Tooltip Preference Integration**: | ||
- Integrated the `show_tool_tips` property with the `Preferences` dialog: | ||
- Added a checkbox option, "Show tool _tips," within the `General` section of the Preferences dialog. | ||
- The checkbox controls the `show_tool_tips` property, giving users an intuitive toggle for tooltip display. | ||
|
||
3. **Simple Brush Boundary**: | ||
- Added a new boolean option `brush_simple_boundary` in the Paintbrush Options GUI. | ||
- In the `gimp_paint_tool_draw` function, the standard complex outline of the brush (derived from the image brush mask) is bypassed when this option is enabled. | ||
- Instead, a simple circular boundary is drawn by the `draw_brush_circle` function, providing a cleaner, less noisy visual representation for large or complex brushes. | ||
3. **Dynamic Tooltip Handling**: | ||
- Updated tooltip-related code in `gimpdockbook.c` and `gimptoolbutton.c` to conditionally check `show_tool_tips`: | ||
- In `gimp_dockbook_create_tab_widget`, tooltips are only displayed if `show_tool_tips` is enabled, and otherwise remain hidden. | ||
- In `gimp_tool_button_query_tooltip`, a similar conditional check prevents tooltip display when `show_tool_tips` is set to `FALSE`. | ||
|
||
### Benefit | ||
|
||
- These updates improve the visual clarity and feedback of the brush cursor during painting. The small contact circle ensures the cursor is always visible, the dashed circle gives clear feedback in erase mode, and the simple brush boundary reduces distractions from complex brush shapes. | ||
- The addition of the `show_tool_tips` option enhances user control over the interface, reducing UI clutter for users who prefer minimal tool guidance, while retaining tooltip functionality for those who rely on detailed tool descriptions. | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.