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 SplitDirection = widgets::SplitContainer::Direction;
|
||||
|
||||
const int WindowManager::uiScaleMin = -5;
|
||||
const int WindowManager::uiScaleMax = 10;
|
||||
|
||||
void WindowManager::showSettingsDialog()
|
||||
{
|
||||
QTimer::singleShot(80, [] { widgets::SettingsDialog::showDialog(); });
|
||||
|
|
|
@ -42,8 +42,8 @@ public:
|
|||
pajlada::Signals::NoArgSignal repaintGifs;
|
||||
pajlada::Signals::Signal<Channel *> layout;
|
||||
|
||||
static const int uiScaleMin = -5;
|
||||
static const int uiScaleMax = 10;
|
||||
static const int uiScaleMin;
|
||||
static const int uiScaleMax;
|
||||
static int clampUiScale(int scale);
|
||||
static float getUiScaleValue();
|
||||
static float getUiScaleValue(int scale);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
|
||||
namespace chatterino {
|
||||
namespace util {
|
||||
|
@ -10,13 +10,7 @@ namespace util {
|
|||
template <class T>
|
||||
constexpr const T &clamp(const T &v, const T &lo, const T &hi)
|
||||
{
|
||||
return clamp(v, lo, hi, std::less<>());
|
||||
}
|
||||
|
||||
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;
|
||||
return assert(!(hi < lo)), (v < lo) ? lo : (hi < v) ? hi : v;
|
||||
}
|
||||
|
||||
} // namespace util
|
||||
|
|
Loading…
Reference in a new issue