inkscape:djb_objects_blend_popup_centre

Last commit made on 2023-07-27
Get this branch:
git clone -b djb_objects_blend_popup_centre https://git.launchpad.net/inkscape

Branch merges

Branch information

Name:
djb_objects_blend_popup_centre
Repository:
lp:inkscape

Recent commits

71f6aee... by Daniel Boles <email address hidden>

dialog/objects: Centre blendModePopup() + cleanups

When reviewing the Controller MR, Mike was bemused that the blend mode
popover opens wherever the pointer was. It was already thus! But it is
fairly easy to always point to the middle of the icon, so do so; hence
it is consistent where we pop up, & we don't obscure the context icon.

* Factor out from getting the expander x to get_cell_area() -> rectangle
* Use it to get cell area for blend mode icon. Change to popup at middle
* Use Controller::has_flag() to more clearly check for pressed modifiers

07fd7a5... by Daniel Boles

Initial batch of porting GdkEVent to Controllers

in preparation for GTK4, where event signals are gone, GdkEvent is an
opaque type & use of GdkEvent is discouraged in favour of Controllers

https://gitlab.com/inkscape/inkscape/-/merge_requests/5474

See MR for full details, unsquashed commits. Highlights for git blame...

ui/controller|ui/manage: new helpers for following
…commits. We have manage() to get gtkmm4-like behaviour here in gtkmm3,
get_current_event_state() to replicate a method that only GTK4 has, and
more importantly a pile of helpers to make gesture creation/adding nice

tool-base +get_latin_keyval for EventControllerKey
This will be used to replace GdkEvents in the following & future commits

dialog/align-dist ::button-press → Button::clicked
It is not really clear to me at all why we were listening to button
press events here, instead of just GtkButton::clicked, or in some cases
simply using GtkActionable. This moves to doing the former, works fine.

color-item ::button-press|enter|leave → Controller
Ditto previous commit, and we don't need to know about GdkEventButton
anymore, which is also nice. Also + #include for RefPtr, just in case.
Updated: Also replace ::enter|leave-event with GtkEventControllerMotion,
noting we seemingly need still to add_events(), and to use PHASE_TARGET.

dialog-notebook: mv from ::button-press to Gesture
Keep connecting after as before, and we need to NOT claim, else
primary-click does not switch tabs.

LPEeditor: Replace enter/leave w/ ControllerMotion
We can't use Utils::make_g_callback() because that only supports member
functions, and we have multiple LPEDrag per instance of ourself. And
it's not worth it anyway since GTK4 should make this far easier with
Widget.set_cursor(). So just do it the ugly way, via the C API.

widget/selected-style: ::button-press→GestureClick
and in doing so, make us consistently listen only for releases, like the
first two tools already did, in particular so that menus act as expected

widget/ink-spinscale: GdkEvents to Controllers and
simplify setting our cursor: use C++ API, don't set it for every motion
event but only on enter (and unset on leave), rm ineffective mask test.

5cf2719... by Daniel Boles

Cleanup use of Gtk::manage()|dynamic_cast<Widget*>

bde7056... by Daniel Boles <email address hidden>

widget/ink-color-wheel: Clean includes, namespaces

and move private functions that need not be members into the .cpp file.

9394bc6... by Daniel Boles <email address hidden>

extensions-gallery|gradient-editor: Fix #includes:

Chiefly, fix includes for 2geom headers being like "this.h", when they
should be like <2geom/this.h> otherwise the build fails on some systems.

While here, sort includes, and move ones that can be forward-declared to
the cpp files, out of the headers.

cec9c63... by Daniel Boles <email address hidden>

auto-connection: Fix move-assign/swap/noexcept etc

* Add noexcept to things that can be, i.e. cannot invoke disconnect()
* Avoid move-constructor redundantly disconnect()ing empty connection
* Use std::exchange() instead of a two-step
* Fix move-assignment did not disconnect existing connection (if any)
* Implement swap() so that swapping won't disconnect either operand -
  - which it otherwise would do now that operator=() rightly does so.

ee90c22... by Daniel Boles <email address hidden>

auto-connection: TODO: use sigc::scoped_connection

Add a TODO that once we depend on sigc++ 3.6 or later, that will now
have a scoped_connection doing the same thing, which I authored. :-)
Once upstream has that we should stop rolling our own variant of it.

https://github.com/libsigcplusplus/libsigcplusplus/pull/97

563d941... by Daniel Boles <email address hidden>

dialog/objects − now unused local variable warning

53f7f8a... by Daniel Boles <email address hidden>

extension/prefdialog: From new|delete → unique_ptr

daa2da2... by Daniel Boles <email address hidden>

widget/ink-spinscale: Cleanups & formatting fixes

* Fix header order per coding style wiki. Add formatting rules footers.
* Tidy includes and add some more forward-declarations 'just in case'.
* Fix indentation & braces style. Remove empty lines at start of funcs
* Remove unnecessary declarations of default destructors, doing nothing
* Make the class final & event handlers private; no one derives or calls
* Add a const getter for the Adjustment; it might be useful one day.
* Move label ustrings into our member, instead of copying