13
0
Commit Graph

99 Commits

Author SHA1 Message Date
81d1724931 NO-OP: add clarifying comment 2024-05-05 15:01:54 -06:00
46fa056da6 add unrounded rectangle methods to Gtkmm2ext for use in truly boxy buttons 2024-04-25 13:03:52 -06:00
3be6ae57ba gtkmm2ext: provide an additional ink extents method to get descender 2023-07-01 21:07:25 -06:00
f76e63fd89
Update size-request when font/style is set 2022-09-20 03:33:15 +02:00
5ef2d04cd8
Remove unused size_request-for_text helpers 2022-09-20 03:33:12 +02:00
luz paz
47c525315d Fix various typos
Found via `codespell -q 3 -S *.po,./.git,./share/patchfiles,./libs,./msvc_extra_headers,./share/web_surfaces,*.patch  -L ba,buss,busses,discreet,doubleclick,hsi,ontop,ro,scrollin,seh,siz,sord,sur,te,trough,ue`
2022-08-03 12:10:01 -06:00
f9d80c32d6
Allow to destroy Widgets when removing them from a container
This is useful when the container uses manage()d Widgets,
which are otherwise not destroyed.
2022-04-14 16:35:02 +02:00
Mads Kiilerich
09c6e68ae8
gtkmm: use append() instead of deprecated Gtk::ComboBoxText::append_text() 2022-04-08 21:10:56 +02:00
0ee8b1706d
Fix event_inside_widget_window()
This fixes cases where a widget's parent isn't the
top-level window and additional offset has to be taken
into account.

So far this has not been an issue since this method was only
used for floating text entries.
2021-05-18 22:17:36 +02:00
3cae11936f Highlight the currently selected item in ArdourDropdown & co 2019-10-31 14:38:26 +01:00
016db85fa1 Workaround a GTKMenu bug in ArdourDropdown & co. 2019-10-31 14:21:57 +01:00
07458155a2 Work around an initialization bug of GTK menus 2019-10-31 11:34:36 +01:00
eaba4fa593 Update |offset| instead of changing the formula
So that the test to see if it fits also takes the new offset into
account.
2019-10-31 10:42:37 +01:00
fb9203998b Align vertical centers of widget and active menuitem 2019-10-31 10:29:43 +01:00
7d48b20652 Fix a thinko in x position of menu popups
This has lasted without being noticed because menus that big are not
common.
2019-10-31 10:29:43 +01:00
5e4d641488
NO-OP: whitespace 2019-10-31 00:22:26 +01:00
98db30efb1
Declare helper function static (don't export) 2019-10-31 00:22:12 +01:00
3a16b89219 Try harder to put the active item under the mouse (ArdourDropdown) 2019-10-30 23:56:36 +01:00
cec5ce8f45
Update canvas/UI lib GPL boilerplate and (C) from git log 2019-08-03 15:53:17 +02:00
01024e2b4c
Add API to render a reflection
This is to be used sparingly because the pattern is dynamically
created every time. Mainly for the benefit of some Mixbus
widgets -- compared to ArdourButton::convex_pattern
2019-04-11 02:06:32 +02:00
7c3fd2fe79 Glib throws a const FileError exception 2018-10-26 13:40:03 +02:00
b27a8169d2 Ignore small (or negative) radii.
Some calls use e.g. (corner_radius - 1.5). With small radii or boxy
layout the radius can become negative.
2018-10-09 19:31:01 +02:00
b32b9ceb58 Constant radian/degree factor 2018-10-09 19:31:01 +02:00
497a3fbaa1 Fix --no-nls (2/5), prefer #if in libs
This is for consistency with system-wide gettext.h which is used
by some 3rd party libs. system-wide gettext uses `#if ENABLE_NLS`,
not #ifdef
2018-09-21 19:03:33 +02:00
e31f242836 Add missing <iostream> header include
This will be required for subsequent commits that remove inclusion of
<iostream> from some shared headers.
2017-04-19 07:49:58 +10:00
c6747c9325 NO-OP: whitespace 2017-04-17 01:50:12 +02:00
3d0366d46b Send unmap event when removing a widget
This fixes a crash when hiding an ArdourCanvas Item VCA which
is about to display a tooltip.
2017-04-17 01:46:27 +02:00
4ece16f348 For MSVC, 'using namespace whatever' doesn't help us to differentiate between ambiguous type names
so... given that 'Rectangle' is a type name that's commonly found in several different namespaces, we'll need to specify explicitly which one we want.
2016-08-19 14:11:00 +01:00
08df4e1920 Fix anchored popups with separators in them
The code computing the position of the popup menu used to compare the
given string to each MenuItem::get_label() result, but that method
actually replaces the content (child) of the MenuItem if that child is
not already a Gtk::Label. In particular, this breaks menu separators.

Avoid the issue by checking by hand if the only child of the MenuItem is
a Label, and directly compare the label text.
2016-08-17 01:45:47 +02:00
6a985df81e Replace positioning function with popup helper
Because all uses of the function positioning menus anchored to a widget
were as callback argument to Gtk::Menu::popup() where the caller needed
to correctly bind arguments, this led to repeated and a bit obscure code.

Wrap the logic into an helper function that takes care of all that, and
update the callers.
2016-08-17 01:45:47 +02:00
a51cd8689f Move anchored menu placement strategy to Gtkmm2ext utils
So that it can be used by others.
2016-08-08 16:44:40 +02:00
1a55e83e98 move show_gdk_event_state() utility function from gtk2_ardour to libs/gtkmm2ext 2016-07-18 14:41:25 -04:00
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
a48fada3c7 move new fractional pane utility functions into libs/gtkmm2ext 2016-05-31 15:30:41 -04:00
49e5494907 also hide persistent tooltips
debatable, since most of them are not "help/tool info" but rather
"current value display".
Then again tooltip is tooltip and can be annoying or not wanted.
2016-04-27 01:07:53 +02:00
51d403d485 allow pixbuf_from_string() to return the full size pixbuf, with optional padding 2016-02-22 15:31:25 -05:00
aba063bfaa remove Gtkmm2ext::possibly_translate_mod_to_make_legal_accelerator().
This is no longer needed because we can set the modifier to the actual bits that GTK uses for Command (META+MOD2)
2016-02-22 15:31:24 -05:00
2c9666e0ee API to add system-specific file chooser shortcuts 2015-10-16 19:06:21 +02:00
79142a262e prepare better solution of Glib's << operator 2015-10-15 11:22:35 +02:00
22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
4dc63966f0 globally remove all trailing whitespace from ardour code base.
Paul Davis was responsible for introducing almost all of this.
2015-10-04 14:51:05 -04:00
f3a1ac21cb associate label more closely with VST path button. the plugin tab needs a complete layout rethink, someday 2015-09-17 16:07:40 -05:00
57321bef35 consistent pango-text layout size - fixes #6490
Use gdk_pango_layout() for all text-size calculations.
In Canvas::Text always use the same context (local image surface)
for layouting (prior to this, local and window-context mix resulted in 
different sizes).
2015-09-06 16:39:08 +02:00
9bc85a553c add API to get combobox option count.
The data model needs to be checked to count available options.
Directly using ComboBoxText::children()::size() counts widgets.
2015-08-11 15:38:26 +02:00
c66ea2c170 add new Gtkmm2ext::pixel_size() to conveniently get width&height for a given font + string 2015-06-29 14:18:14 -04:00
4c2ea510e3 add API to query Gtk::ComboBoxText entries
..the overly complex C++ style variant.
iterate twice..  hell yeah.
2015-03-16 14:38:21 +01:00
4166b05bda Fix setting command key bindings on OSX. 2015-01-14 20:31:38 -05:00
bb4e3a2916 add Gtkmm2ext::event_inside_widget_window() 2014-11-02 08:57:47 -05:00
b75b88a1eb Use text to specify combo box padding for better font/display tolerance.
Consistent mixer strip button height.

The latter works by setting all the button size request heights to the
calculated height of the alphabet.  Thus, all buttons of the same class will be
the same height regardless of their actual text.
2014-07-30 18:30:42 -04:00
b9c53ea395 add std::string variant of set_size_request_to_display_given_string() 2014-07-09 16:48:36 -04:00