optimize icons

This commit is contained in:
T1ti
2024-05-25 02:05:07 +02:00
parent 41f2e06663
commit 657fafe208
2 changed files with 4 additions and 10 deletions

View File

@@ -37,18 +37,15 @@ namespace Noggit
temp_btn->ensurePolished();
QColor color;
if (state == QIcon::On)
{
color = temp_btn->palette().color(QPalette::WindowText);
painter->setPen(temp_btn->palette().color(QPalette::WindowText));
}
else if (state == QIcon::Off)
{
color = temp_btn->palette().color(QPalette::Disabled, QPalette::WindowText);
painter->setPen(temp_btn->palette().color(QPalette::Disabled, QPalette::WindowText));
}
painter->setPen(color);
delete temp_btn;

View File

@@ -37,18 +37,15 @@ namespace Noggit
temp_btn->ensurePolished();
QColor color;
if (state == QIcon::On)
{
color = temp_btn->palette().color(QPalette::WindowText);
painter->setPen(temp_btn->palette().color(QPalette::WindowText));
}
else if (state == QIcon::Off)
{
color = temp_btn->palette().color(QPalette::Disabled, QPalette::WindowText);
painter->setPen(temp_btn->palette().color(QPalette::Disabled, QPalette::WindowText));
}
painter->setPen(color);
delete temp_btn;