Commit Graph

15 Commits

Author SHA1 Message Date
Paul Davis 16ed245977 allow true boxy buttons for ArdourButtons
Also add a default tweaks static member to force all buttons to a given tweak state
2024-04-25 13:03:52 -06:00
jean-emmanuel 08ad1af9dc ui: button: themable outline color instead of hard-coded black 2024-01-20 14:44:30 +01:00
Paul Davis b35518e212 switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
2023-03-24 14:19:15 -06:00
Robin Gareus 3d6ecaad79
Allow to override Ardour button text padding 2022-11-09 09:42:50 +01:00
Robin Gareus 8508b3dba4
Allow multiple sizing texts for ArdourButton/Dropdown
A widget's style (font) is only set after the widget has been
packed and inherits relevant information from the top-level window.

`set_size_request_to_display_given_text()` produces incorrect
results when it is called for widgets without a top-level
(here ARDOUR_UI::setup_windows() _main_window.add(), changes the
font from "Sans 11" to "Sans 9" for ArdourDropdowns).

`set_size_request_to_display_given_text()` must subscribe to
`signal_style_changed()`, however in case of ArdourButton UI-scaling
of elements also needs to be taken into account. It is preferable
to allow for multiple sizing-texts directly.
2022-09-20 02:35:26 +02:00
Ben Loftis d87b1053df ArdourButton: ColorBox flag is for color-picker buttons 2021-12-30 21:25:39 -06:00
Ben Loftis 6f28d71729
ArdourButton: add flags to force boxy/flat style
Add flags ForceBoxy, ForceFlat for the rectab track header grid
2021-02-22 01:00:06 +01:00
Robin Gareus 2abf9c66a4
Fix size-request that rely on Pango::Layout
A Pango::Layout created by Gtk::Widget::get_pango_context ()
does not have any font set. The Font is inherited from the
layout's context.

The actual font is set when the layout is used in
on_expose_event() via get_window ()->create_cairo_context ().

In some cases we rely on the font-size to calculate the widget's
size before rendering. At this point in time there is no drawing
context from which to inherit the style.

Furthermore, even after a call to `ensure_style()` in the c'tor
of a Widget get_font() simply returns the default value.

All Widgets that rely an Pango::Layout font size during
size-requests have to explicitly set the font.

This fixes various overlarge buttons with the initial default layout.
2021-01-30 02:23:35 +01:00
Robin Gareus e78de225d4
ArdourButton: LED-sized buttons w/o LED
This is useful for consistent layout in the recorder Window,
where Buttons are either push-buttons or LED toggle-buttons.
2021-01-25 19:18:56 +01:00
Robin Gareus 7b3ca486a4
Allow to un-set custom Ardour-button colors 2019-09-01 16:57:48 +02:00
Robin Gareus cec5ce8f45
Update canvas/UI lib GPL boilerplate and (C) from git log 2019-08-03 15:53:17 +02:00
Robin Gareus d97973925d const where const is due 2018-01-31 12:45:58 +01:00
Robin Gareus fe63db8697 Ardour Button Toggle explosion
Add option to use ArduorButton as standalone Toggle/Checkbox.
Usually ArdourButton relegates this to Actions or is backed by Config.
This allows to use the Button as standalone Toggle, get_active()
It should maybe be a derived Class, but ArdourButton is already beyond
that..
2018-01-30 19:52:27 +01:00
Robin Gareus f9e5e4360e Move more Gtkmm2ext widgets into libwidget 2017-07-17 21:06:04 +02:00
Robin Gareus 5c92613698 Separate Ardour UI widgets into dedicated library 2017-07-17 21:06:04 +02:00