Commit Graph

179 Commits

Author SHA1 Message Date
b9e8b5940b Fix Dropdown w/icon size and alignment 2016-12-20 18:48:10 +01:00
b552ed886f Add support for Pango Markup to ArdourButton 2016-12-10 15:54:41 +01:00
6a429cfb7c Consistent ArdourButton sizing for elements with LED 2016-12-10 15:54:37 +01:00
3921e33c2a Avoid 1px size changes when sizing_text() is used
When requesting a size for ArdourButton, the width and height of the
button could be increased by one to ensure the center of the text would
lie exactly at the center of the button.

I initially thought that it was a good idea even when the text used for
sizing was frozen, but the main (and only?) use-case for that is to
actually freeze the size of the button regardless of the actual
displayed text, so jittering by one pixel is not welcome.

Only do the centering tweak if there is no sizing text.
2016-08-25 19:23:49 +02:00
6588da09b3 Silence a GCC initialization order warning 2016-08-21 15:04:06 +02:00
99e31db66e Invalidate char_pixel_* on possible font change
So that the padding and other elements always correctly depend on the
font instead of the default GTK font (which might have a wildly
different size from the fixed size fonts of Ardour's custom theme).
2016-08-20 16:01:15 +02:00
f108bf1373 ArdourButton: add text for measuring decoupled from display text
In the normal course of events, an ArdourButton requests just enough
space to display its elements. In particular the size will change when
the text does. Yet, in several cases it is better to avoid layout jittering; until now ArdourButton users manually set a static size on the button at creation time.

Introduce new API to set the text used for measuring the button size
separately from the text that will be displayed. In most cases this
enables the callers to replace

    set_size_request_to_display_given_text(button, text, w, h);

where w and h were hard-coded to cater for other button elements, by

    button.set_sizing_text(text);

which will make ArdourButton correctly compute the size request in all
cases with its real elements and padding. ArdourButton users can call

    button.set_sizing_text("");

to get the size request depend on displayed text (which is the default).
2016-08-20 16:00:46 +02:00
523306036e Make ArdourButton detect when a grab should stop being pressed
If for whatever reason a grab is taken (e.g. a menu popping up) while
somebody is pressing a mouse button on an ArdourButton, then the
ArdourButton will not get the mouse button release event and will look
stuck in pressed position.

The leave notify event is fired if the mouse is still on the
ArdourButton while the grab is taken, but not if the user was dragging
the mouse outside of the button.

The only reliable way is to listen for the grab_broken_event signal.
Do so.
2016-08-18 16:16:17 +02:00
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
602b1597a4 fix background of ArdourButtons with no Body 2016-07-04 00:20:11 +02:00
0fe194c90b extend ArdourButton API to provide a new tweak for buttons with occasional text
Buttons with this tweak do not change their size request based on their text (or lack of it)
2016-06-14 11:47:25 -04:00
ef6f0de5a3 extend ArdourButton API to allow independently setting fixed active/inactive colors 2016-06-09 16:03:14 -04:00
effb08c121 hack to ArdourButton to get sizing correct for 90 + 270 degree rotated text 2016-05-31 15:30:43 -04:00
c4e610d091 small ArdourButton optimization 2016-04-08 18:16:27 +02:00
9ff4938ddd initialize some uninitialized variables 2016-03-31 23:40:23 +02:00
9a11e3a64d change API for CairoWidget::focus_handler
This functor/closure is responsible for stealing focus from any existing text entry (or whatever else may have focus)
when clicking on a CairoWidget or derived class.

The old implementation just gave focus back to the editor canvas. The new version walks up the widget packing
heirarchy to find a focusable parent (from the CairoWidget for which it is invoked). If no focusable parent
is found, it cancels keyboard focus in the toplevel window containing the CairoWidget
2016-03-15 12:41:21 -04:00
André Nusser
83b5bdbe95 Ctrl+shift functionality (toggle all) for plugin leds.
The Fader led has special behavior and is only toggled when clicked
explicitly.
2015-10-19 14:36:06 -04: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
69b44ee829 Use tooltips.h in ArdourButton to remove ardour_ui.h inclusion 2015-09-16 16:55:17 -04:00
6b019a4953 Move UIConfiguration Singleton into UIConfiguration header
This removes the direct dependence on ardour_ui.h from 39 files
2015-09-16 16:55:17 -04:00
45d487f16e Move ARDOUR_UI::ui_scale into UIConfiguration class 2015-09-16 16:55:17 -04:00
fc1e7dbb55 Move DPIReset and ColorsChanged signals into UIConfiguration 2015-09-16 16:55:17 -04:00
6c4d2a576d vector icons should at least be 6x6 px 2015-05-30 17:28:32 +02:00
1d5c6104f5 replace old ArdourButton::Icon API with Gtkmm2ext. 2015-05-24 21:45:39 +02:00
0604910a2a ArdourButton API: set_icon() implies Icon and No Text 2015-05-24 20:27:37 +02:00
c5d7685741 add vector rendition of nudge icons. 2015-05-24 20:22:50 +02:00
ff5b1b0c99 prepare cleanup of ArdourButton rendering 2015-05-24 19:35:45 +02:00
e418b0866e tweak Midi/DIN icon (proper notch) 2015-05-01 15:16:32 +02:00
1dc9848d61 tweak weight of transport icons 2015-04-25 23:24:05 +02:00
b38ab89d92 clean up GUI scaling 2015-04-22 21:40:43 +02:00
5509165935 new attempt at scaling indicator LED 2015-04-21 03:04:34 +02:00
494009a6e2 towards scaleable meter and mixer UI
somewhat hacky solution, but there's no good central point to
control this and get integer rounding/summing, is there?
2015-04-20 20:45:36 +02:00
b23b3e0891 HiDPI button tweaks 2015-04-18 20:20:21 +02:00
70a493d510 renice transport icons 2015-04-08 11:29:55 +02:00
47eb9d3fe1 NOOP, cleanup & comments 2015-04-08 10:18:39 +02:00
2356d63d14 construct a metronom 2015-04-08 01:28:52 +02:00
c9f9bb263f more transport button caironizing. 2015-04-08 00:00:23 +02:00
1c4fc896d0 fix de7d6a7 (too narrow bar) 2015-04-07 22:39:42 +02:00
de7d6a7f2c renice transport buttons (part one) 2015-04-07 22:34:09 +02:00
d25e8f2233 update ArdourButton Icon API 2015-04-07 22:34:09 +02:00
098ef68bb8 renice 5-pin DIN/MIDI button 2015-04-06 19:51:48 +02:00
68e3ba189e replace two more icons w/vector drawing. 2015-04-06 18:43:18 +02:00
741bcc9fa4 Abutton: only LMB clicks are “clicks”. 2015-03-17 11:58:59 +01:00
edb86929f5 amend 6aa6c2d, queue redraw for custom-LED change 2015-03-17 04:02:59 +01:00
6aa6c2d552 AButton: decouple indicator color and active state.
If a custom LED color is used, the LED does not
reflect the ExplicitActive state. Hence the 
Body Element (if visible) should be used just like
for buttons without LED indicator.
2015-03-17 02:08:41 +01:00
28e4708825 AButton: allow to set custom LED color (for > 2 states) 2015-03-16 19:04:36 +01:00
421d4aae2e further ardourbutton ellipsis fixes 2015-03-12 12:26:23 +01:00
69dc9451a7 NOOP, add a missing ‘p’ 2015-03-11 20:06:41 +01:00
ffa6954875 fixup LED size (font-scaling)..
..until there's a better solution.
2014-12-27 18:05:42 +01:00