ardour/libs/widgets/ardour_spacer.cc

52 lines
1.4 KiB
C++
Raw Normal View History

2016-12-18 21:39:36 +01:00
/*
* Copyright (C) 2017 Robin Gareus <robin@gareus.org>
* Copyright (C) 2018 Ben Loftis <ben@harrisonconsoles.com>
2016-12-18 21:39:36 +01: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.
*
* 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>
#include "widgets/ardour_spacer.h"
2016-12-18 21:39:36 +01:00
using namespace ArdourWidgets;
2016-12-18 21:39:36 +01:00
ArdourScalingSpacer::ArdourScalingSpacer (int natural_width, int natural_height)
: CairoWidget ()
, _natural_width (natural_width)
, _natural_height (natural_height)
{
}
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
{
}
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
{
}
ArdourDropShadow::ArdourDropShadow (ShadowMode m, float a)
2018-02-17 22:25:39 -06:00
: CairoWidget ()
, alpha (a)
, mode (m)
2018-02-17 22:25:39 -06:00
{
}