fixed linux

This commit is contained in:
fourtf 2018-06-11 19:11:33 +02:00
parent f2f34a4068
commit 3f9a48fd72
3 changed files with 7 additions and 10 deletions

View file

@ -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(); });

View file

@ -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);

View file

@ -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