mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
fixed linux
This commit is contained in:
parent
f2f34a4068
commit
3f9a48fd72
|
@ -25,6 +25,9 @@ namespace singletons {
|
||||||
using SplitNode = widgets::SplitContainer::Node;
|
using SplitNode = widgets::SplitContainer::Node;
|
||||||
using SplitDirection = widgets::SplitContainer::Direction;
|
using SplitDirection = widgets::SplitContainer::Direction;
|
||||||
|
|
||||||
|
const int WindowManager::uiScaleMin = -5;
|
||||||
|
const int WindowManager::uiScaleMax = 10;
|
||||||
|
|
||||||
void WindowManager::showSettingsDialog()
|
void WindowManager::showSettingsDialog()
|
||||||
{
|
{
|
||||||
QTimer::singleShot(80, [] { widgets::SettingsDialog::showDialog(); });
|
QTimer::singleShot(80, [] { widgets::SettingsDialog::showDialog(); });
|
||||||
|
|
|
@ -42,8 +42,8 @@ public:
|
||||||
pajlada::Signals::NoArgSignal repaintGifs;
|
pajlada::Signals::NoArgSignal repaintGifs;
|
||||||
pajlada::Signals::Signal<Channel *> layout;
|
pajlada::Signals::Signal<Channel *> layout;
|
||||||
|
|
||||||
static const int uiScaleMin = -5;
|
static const int uiScaleMin;
|
||||||
static const int uiScaleMax = 10;
|
static const int uiScaleMax;
|
||||||
static int clampUiScale(int scale);
|
static int clampUiScale(int scale);
|
||||||
static float getUiScaleValue();
|
static float getUiScaleValue();
|
||||||
static float getUiScaleValue(int scale);
|
static float getUiScaleValue(int scale);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <algorithm>
|
#include <functional>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
namespace util {
|
namespace util {
|
||||||
|
@ -10,13 +10,7 @@ namespace util {
|
||||||
template <class T>
|
template <class T>
|
||||||
constexpr const T &clamp(const T &v, const T &lo, const T &hi)
|
constexpr const T &clamp(const T &v, const T &lo, const T &hi)
|
||||||
{
|
{
|
||||||
return clamp(v, lo, hi, std::less<>());
|
return assert(!(hi < lo)), (v < lo) ? lo : (hi < v) ? hi : v;
|
||||||
}
|
|
||||||
|
|
||||||
template <class T, class Compare>
|
|
||||||
constexpr const T &clamp(const T &v, const T &lo, const T &hi, Compare comp)
|
|
||||||
{
|
|
||||||
return assert(!comp(hi, lo)), comp(v, lo) ? lo : comp(hi, v) ? hi : v;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace util
|
} // namespace util
|
||||||
|
|
Loading…
Reference in a new issue