Attempt to make icon states
This commit is contained in:
@@ -42,7 +42,7 @@ namespace noggit
|
||||
{
|
||||
auto layout (new QFormLayout (this));
|
||||
|
||||
auto brush_group (new QGroupBox (this));
|
||||
auto brush_group(new QGroupBox("Brush", this));
|
||||
auto brush_layout (new QFormLayout (brush_group));
|
||||
|
||||
_radius_spin = new QDoubleSpinBox (this);
|
||||
|
||||
@@ -37,8 +37,26 @@ namespace noggit
|
||||
temp_btn->ensurePolished();
|
||||
painter->setPen (temp_btn->palette().color(QPalette::WindowText));
|
||||
|
||||
QColor normal_button_color;
|
||||
if (mode == QIcon::Normal)
|
||||
{
|
||||
normal_button_color = temp_btn->palette().color(QPalette::WindowText);
|
||||
}
|
||||
|
||||
QColor off_button_color;
|
||||
if (state == QIcon::Off)
|
||||
{
|
||||
off_button_color = temp_btn->palette().color(QPalette::Shadow);
|
||||
}
|
||||
|
||||
QColor disabled_button_color;
|
||||
if (mode == QIcon::Disabled)
|
||||
{
|
||||
disabled_button_color = temp_btn->palette().color(QPalette::BrightText);
|
||||
}
|
||||
delete temp_btn;
|
||||
|
||||
|
||||
if (!_fonts.count (rect.height()))
|
||||
{
|
||||
auto id (QFontDatabase::addApplicationFont (":/fonts/fa-solid-900.ttf"));
|
||||
@@ -82,5 +100,7 @@ namespace noggit
|
||||
font_awesome_icon::font_awesome_icon (font_awesome::icons const& icon)
|
||||
: QIcon (new font_awesome_icon_engine (QString (QChar (icon))))
|
||||
{}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user