2016-12-18 21:39:36 +01:00
|
|
|
/*
|
2017-07-15 17:38:28 +02:00
|
|
|
* Copyright (C) 2017 Robin Gareus <robin@gareus.org>
|
2019-08-03 04:40:09 +02:00
|
|
|
* Copyright (C) 2018 Ben Loftis <ben@harrisonconsoles.com>
|
2016-12-18 21:39:36 +01:00
|
|
|
*
|
2019-08-03 04:40:09 +02:00
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
2016-12-18 21:39:36 +01:00
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
2019-08-03 04:40:09 +02:00
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2016-12-18 21:39:36 +01:00
|
|
|
*/
|
|
|
|
|
|
2025-06-11 23:57:55 +02:00
|
|
|
#include <algorithm>
|
|
|
|
|
|
2017-07-15 17:38:28 +02:00
|
|
|
#include "widgets/ardour_spacer.h"
|
2016-12-18 21:39:36 +01:00
|
|
|
|
2017-07-15 17:38:28 +02:00
|
|
|
using namespace ArdourWidgets;
|
2016-12-18 21:39:36 +01:00
|
|
|
|
2025-06-10 20:27:41 +02:00
|
|
|
ArdourScalingSpacer::ArdourScalingSpacer (int natural_width, int natural_height)
|
|
|
|
|
: CairoWidget ()
|
|
|
|
|
, _natural_width (natural_width)
|
|
|
|
|
, _natural_height (natural_height)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2017-07-15 17:38:28 +02:00
|
|
|
ArdourVSpacer::ArdourVSpacer (float r)
|
|
|
|
|
: CairoWidget ()
|
2025-06-11 23:57:55 +02:00
|
|
|
, _ratio (std::min (1.f, r))
|
2016-12-18 21:39:36 +01:00
|
|
|
{
|
2017-07-15 17:38:28 +02:00
|
|
|
}
|
2018-02-17 22:25:39 -06:00
|
|
|
|
2020-07-21 04:41:16 +02:00
|
|
|
ArdourHSpacer::ArdourHSpacer (float r)
|
|
|
|
|
: CairoWidget ()
|
2025-06-11 23:57:55 +02:00
|
|
|
, _ratio (std::min (1.f, r))
|
2020-07-21 04:41:16 +02:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2018-02-19 08:01:27 -06:00
|
|
|
ArdourDropShadow::ArdourDropShadow (ShadowMode m, float a)
|
2018-02-17 22:25:39 -06:00
|
|
|
: CairoWidget ()
|
|
|
|
|
, alpha (a)
|
2018-02-19 08:01:27 -06:00
|
|
|
, mode (m)
|
2018-02-17 22:25:39 -06:00
|
|
|
{
|
|
|
|
|
}
|