mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-12 17:46:34 +01:00
bring back old pixfader outline radius to demonstrate its issues
This commit is contained in:
parent
e9ff578f3a
commit
bb70d426ba
1 changed files with 5 additions and 4 deletions
|
|
@ -33,10 +33,10 @@ using namespace Gtkmm2ext;
|
||||||
using namespace Gtk;
|
using namespace Gtk;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
#define CORNER_RADIUS 4
|
#define CORNER_RADIUS 2.5
|
||||||
#define CORNER_SIZE 2
|
#define CORNER_SIZE 2
|
||||||
#define CORNER_OFFSET 1
|
#define CORNER_OFFSET 1
|
||||||
#define FADER_RESERVE 6 // >= 1.5 * CORNER_RADIUS
|
#define FADER_RESERVE 6
|
||||||
|
|
||||||
std::list<PixFader::FaderImage*> PixFader::_patterns;
|
std::list<PixFader::FaderImage*> PixFader::_patterns;
|
||||||
|
|
||||||
|
|
@ -234,10 +234,11 @@ PixFader::on_expose_event (GdkEventExpose* ev)
|
||||||
cairo_set_source_rgba (cr, 0, 0, 0, 1.0);
|
cairo_set_source_rgba (cr, 0, 0, 0, 1.0);
|
||||||
|
|
||||||
cairo_matrix_t matrix;
|
cairo_matrix_t matrix;
|
||||||
Gtkmm2ext::rounded_rectangle (cr, CORNER_OFFSET, CORNER_OFFSET, w-CORNER_SIZE, h-CORNER_SIZE, CORNER_RADIUS);
|
Gtkmm2ext::rounded_rectangle (cr, CORNER_OFFSET, CORNER_OFFSET, w-CORNER_SIZE, h-CORNER_SIZE, CORNER_RADIUS + 1.5);
|
||||||
// we use a 'trick' here: The stoke is off by .5px but filling the interior area
|
// we use a 'trick' here: The stoke is off by .5px but filling the interior area
|
||||||
// after a stroke of 2px width results in an outline of 1px
|
// after a stroke of 2px width results in an outline of 1px
|
||||||
cairo_stroke_preserve(cr);
|
cairo_stroke (cr);
|
||||||
|
Gtkmm2ext::rounded_rectangle (cr, CORNER_OFFSET, CORNER_OFFSET, w-CORNER_SIZE, h-CORNER_SIZE, CORNER_RADIUS);
|
||||||
|
|
||||||
if (_orien == VERT) {
|
if (_orien == VERT) {
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue