Browse Source

Fix theme build, cleanup

tags/1.9.4
falkTX 11 years ago
parent
commit
ca91910e3b
4 changed files with 7 additions and 13 deletions
  1. +1
    -7
      source/modules/theme/CarlaStyle.hpp
  2. +2
    -2
      source/modules/theme/CarlaStyleAnimations.hpp
  3. +3
    -3
      source/modules/theme/CarlaStylePrivate.hpp
  4. +1
    -1
      source/modules/theme/Makefile

+ 1
- 7
source/modules/theme/CarlaStyle.hpp View File

@@ -35,14 +35,8 @@ class CarlaStyle : public QCommonStyle
Q_OBJECT

public:
enum ColorScheme {
COLOR_BLACK = 0,
COLOR_BLUE = 1,
COLOR_SYSTEM = 2
};

CarlaStyle();
~CarlaStyle();
~CarlaStyle() override;

QPalette standardPalette() const override;
void drawPrimitive(PrimitiveElement elem, const QStyleOption* option, QPainter* painter,


+ 2
- 2
source/modules/theme/CarlaStyleAnimations.hpp View File

@@ -51,7 +51,7 @@ public:
connect(this, SIGNAL(finished()), SLOT(deleteLater()));
}

virtual ~CarlaStyleAnimation()
~CarlaStyleAnimation() override
{
}

@@ -60,7 +60,7 @@ public:
return parent();
}

int duration() const
int duration() const override
{
return _duration;
}


+ 3
- 3
source/modules/theme/CarlaStylePrivate.hpp View File

@@ -43,7 +43,7 @@ public:
{
}

~CarlaStylePrivate()
~CarlaStylePrivate() override
{
qDeleteAll(fAnimations);
}
@@ -109,7 +109,7 @@ public:
QColor buttonColor(const QPalette& pal) const
{
QColor buttonColor = pal.button().color();
int val = qGray(buttonColor.rgb());
const int val = qGray(buttonColor.rgb());
buttonColor = buttonColor.lighter(100 + qMax(1, (180 - val)/6));
buttonColor.setHsv(buttonColor.hue(), buttonColor.saturation() * 0.75, buttonColor.value());
return buttonColor;
@@ -137,7 +137,7 @@ public:

void stopAnimation(const QObject* target) const
{
CarlaStyleAnimation* animation = fAnimations.take(target);
CarlaStyleAnimation* const animation = fAnimations.take(target);
if (animation != nullptr && animation->state() != QAbstractAnimation::Stopped)
animation->stop();
}


+ 1
- 1
source/modules/theme/Makefile View File

@@ -163,7 +163,7 @@ moc_%.qt4.cpp: %.hpp
$(MOC_QT4) $< -o $@

moc_%.cpp: %.hpp
$(MOC) $< -o $@
$(MOC) -Istyles $< -o $@

resources.cpp: ../../../resources/resources-theme.qrc
$(RCC) $< -o $@


Loading…
Cancel
Save