Previously, when using shortcuts to increase or decrease the font size of
the selected text, the size would jump to 0. This behavior occurred because,
if the text did not yet have a font tag, the initial font size was evaluated as 0.
This commit ensures that the text tool's default font size is used when
no font tag is present. This prevents the font size from jumping to 0 the
first time the shortcuts are used.
eec9d512 did not block calls to
gimp_drawable_filters_editor_visible_all_toggled () when
updating the "All Visible" toggle button in
gimp_drawable_filters_editor_set_sensitive (). This resulted
in unexpected visibility changes in some combinations of
filters being turned on and off.
This patch adds the blocking calls around the call to
gtk_toggle_button_set_active () to keep this consistent.
Tab was intentionally removed from the action entry to avoid overriding
its standard accessibility usage across the software, leaving the menu
item and shortcut editor showing no shortcut. This adds a cosmetic hint
in gimp_action_get_display_accels() to show 'Tab' without registering a
real accelerator.
Resolves#12791 (again)
After cleaning up and separating the filter pop-up code
from GimpItemTreeView to GimpDrawableTreeView-Filters,
we accidentally lost the checks that prevent deleting filters
that have not yet been applied (thus causing a crash).
This patch restores the checks for the filter to not be temporary
before you can delete it.
Resolves#16002
Since the "Toggle All Filter Visibility" button's state
is only updated when the NDE filter popover first
appears, it could get out of sync with the current state
of the filter stack.
(For instance, if you open the popover and turn all the
filters' visibility off, then clicked the button, it would try
to turn them off again)
This patch adds a check for gimp_drawable_has_visible_filters ()
whenever the filter changes, and updates the toggle button
with that value.
This patch also condenses the filter visibility check to use
the existing function rather than its own custom code.
Currently to change vector layer properties,
you need to grab the VectorLayerOptions
and then grab its FillOptions or the
StrokeOptions to make changes.
To make this process more self-contained,
this patch creates a gimp_vector_layer_set ()
function that operates in the same manner
as gimp_text_layer_set ().
This patch adds properties for Fill -
Stroke properties will be added in a
follow-up commit.
This also adds
automatic tracking for Undoing/Redoing
vector property settings.
A demonstration of its use in DnD colors
and patterns onto the layer dock is
included.
Building on d8d8e7a0, we add a gimp_layer_tree_drop_viewables ()
function to handle dragging and dropping a pattern onto a Vector
layer in the layer dock.
916cf84e handles dragging and dropping colors
onto vector layers on the canvas. However, we did
not handle what happens if you drag and drop onto
the layer dock.
This patch adds logic to gimp_layer_tree_view_drop_color ()
so that it also updates the vector layer fill, instead of
treating the vector layer like a raster layer and filling the
whole layer with the color.
On Windows gtk_clipboard_store ignores the number of items we have
set to be stored, instead storing all. Since this can be a long list,
shutting down GIMP on Windows can take considerable time when you
have a larger selection on the clipboard.
So we manually stop handling every target larger than 1 (png) and even
stop handling png after the first time, since it often gets called
multiple times for png.
Same patch as cb552d3d, just applied to GimpPrefsBox.
This was visible in the Preferences Dialog, where the same
unnecessary pop-up appeared in the side panel.
This was happening on Wayland in my tests, and apparently on Windows
too, according to the report. I widely simplified the code. Now we don't
list of axis anymore, and therefore we don't allow to change these
(which was not working anyway, for as long as I remember, at least on
Linux, both X11 and Wayland).
As for the pressure curve, we just show it unconditionally for any
device of type "Pen". It may mean that it might show on some rare stylus
devices with no pressure support, but in such case, it will just be a
bogus curve (it won't break the device).
And then we'll avoid all the flimsy heuristic trying to guess if a
device is supposed to have pressure sensitivity, which especially became
bad in Wayland as we have this information only on proximity. It means
that if you don't approach the stylus and were trying to set up your
pen's pressure curve with a mouse, no curve would appear!
Add to this that gdk_device_list_axes() seems very broken on Wayland and
was always returning GDK_NONE for all axis (even when only using it on
various device signal handlers, per advices by Carlos on IRC), at least
anyhow I tried to make it work, our heuristic to detect when an axis
should be ignored was completely broken on Wayland as well.
A simpler logic should work better and makes the code simpler to read
too.
It's also one less usage of GtkListStore, which is good for future GTK
versions where it got deprecated!
Since the Text Editor window uses the same
GimpTextStyleEditor widget as the on-canvas editor,
it also shows the Move handle (which doesn't work
in the Text Editor window). This patch simply hides it
so it doesn't confuse users.
This patch adds a CSS class name to
GimpPivotSelector so we can define its
CSS style in the GUI.
It also defines the margin-right CSS property
to prevent it be affected by the general
GimpOverlayDialog style.
Resolves#13014
In GimpHistogramEditor, pixels and counts are stored
as doubles. We previously converted them into 32bit integers
when displaying the values to the user.
As it is possible for the dimensions of an image to exceed the
limit of a 32bit integer, this could lead to overflow and negative
pixel counts.
This patch switches our display code to use 64bit gsize casts
for conversion to prevent this from happening.
If a filter is inactive/invisible, it does not
affect the appearance of the drawable.
Therefore, when merging all active filters,
those filters should not be removed.
This patch adds conditional checks for
gimp_filter_get_active () and does not
remove filters on merge if it returns
FALSE. It also adds sensitivity checks in
the GUI so that the merge down button is
not active if there are no visible filters.
In particular, for indexed images, color choice will happen within the
colormap.
The following uses are made context-aware:
* Test tool options color;
* Fill colors.
These other uses will not be context-aware:
* Padding, quick-mask and padding colors;
* Out-of-gamut colors;
* Generically generated color buttons (e.g. in filter dialogs);
* Foreground selection's mask color;
* Grid colors.
This was introduced in commit d4733e5b21. This was triggering a focus
grab each time we changed the color from within the FG/BG dialog, which
in particular had the focus being lost from said dialog. This is not
really good usability wise (and as a side issue, with some themes, the
focus change was apparently a bit bothering visually).
We use a GimpCellRenderToggle for the Fx icon
in the layer and channel docks. If you hover over it
when there's no filter, a square "checkbox" will appear
and give the impression you can click on it, even though
you currently can not.
This patch connects the "visible" property of the toggle to
the number of filters attached to the drawable, similar to
what we did for "active". This prevents the checkbox from
appearing, and will hopefully reduce user confusion.
...for dark mode.
The Navigation and Selection Editor
docks use GIMP_ICON_TEXTURE as their
default background when there's no
active image. On dark mode, this creates
large bright areas in the UI.
This patch removes the calls to
gimp_view_renderer_set_background ()
for these docks so the theme background
is used instead.
GimpLayerTreeView's delete button always deletes
the selected layer(s), even if a mask is selected.
This patch adds a new action button for deleting masks
(using the "layers-mask-delete" action) and conditionally
shows/hides it and the existing delete button based on
whether the mask or the layer is selected.
Note that after 3.2, we may replace this commit with a
single new action that conditionally deletes either the
mask or layer, depending on the selected item.
… input devices.
Per Carlos' advice on gtk#7534, I wait for us to get a focus, since the
pad devices are only created at that point.
Note that this is a Wayland-only issue, but since it doesn't matter too
much that input devices are not initialized before we have a focused GUI
anyway, let's make this simpler.
At the earliest, the splash focus can announce a focus, but since it is
possible to start GIMP without the splash, display shells will also
possibly announce the first focus (there will always be a display shell
focusing at some point for any GUI GIMP!).
As seen in the Welcome Dialog, if you have multi-selection
in place for a ListBox and try to Ctrl-click another row,
the call to gtk_list_box_select_row () will deselect the
prior row unless you click on an area that's not covered
by GimpRow. This patch removes the forced selection,
with the assumption that the click will bubble through
as normal to GtkListBox.
...on non-raster layers.
Resolve#15368
Per Bruno, the "Merge Filters" button on the
NDE filter pop-up should have the same warning
message if it is disabled as the "Merge Filter"
checkbox does in the Filter Tool itself.
Since the button is visible when there's a group
layer, a warning is also displayed for that, though
due to string freeze it is not yet set to be
translatable.
This patch adds a GimpItemChooser widget
for use in GimpProcedureDialog Item parameter
GUI creation.
This will deprecate the existing
GimpDrawableChooser, as it covers all the
same cases plus others such as GimpPath.