Refactoring. Code style.
This commit is contained in:
parent
1261708b06
commit
f8562b63ea
|
@ -29,16 +29,14 @@
|
|||
|
||||
#include "stylehelper.h"
|
||||
|
||||
#include <QPixmapCache>
|
||||
#include <QWidget>
|
||||
#include <QRect>
|
||||
#include <QPainter>
|
||||
#include <QApplication>
|
||||
#include <QPalette>
|
||||
#include <QStyleOption>
|
||||
#include <QObject>
|
||||
|
||||
#include "../vmisc/vmath.h"
|
||||
#include <QPainter>
|
||||
#include <QPalette>
|
||||
#include <QPixmapCache>
|
||||
#include <QRect>
|
||||
#include <QStyleOption>
|
||||
#include <QWidget>
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
auto StyleHelper::sidebarFontSize() -> qreal
|
||||
|
@ -82,9 +80,7 @@ auto StyleHelper::baseColor(bool lightColored) -> QColor
|
|||
auto StyleHelper::borderColor(bool lightColored) -> QColor
|
||||
{
|
||||
QColor result = baseColor(lightColored);
|
||||
result.setHsv(result.hue(),
|
||||
result.saturation(),
|
||||
result.value() / 2);
|
||||
result.setHsv(result.hue(), result.saturation(), result.value() / 2);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -103,9 +99,7 @@ void StyleHelper::setBaseColor(const QColor &newcolor)
|
|||
m_requestedBaseColor = newcolor;
|
||||
|
||||
QColor color;
|
||||
color.setHsv(newcolor.hue(),
|
||||
static_cast<int>(newcolor.saturation() * 0.7),
|
||||
64 + newcolor.value() / 3);
|
||||
color.setHsv(newcolor.hue(), static_cast<int>(newcolor.saturation() * 0.7), 64 + newcolor.value() / 3);
|
||||
|
||||
if (color.isValid() && color != m_baseColor)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user