UI: GraphPage: Simplify setupGraphColors() to have less lines

This commit is contained in:
Nodir Temirkhodjaev 2024-11-01 14:33:49 +05:00
parent 9f21147705
commit e62381e3ff
2 changed files with 11 additions and 0 deletions

View File

@ -256,6 +256,12 @@ void GraphPage::setupColorsBox()
}
void GraphPage::setupGraphColors()
{
setupGraphColors1();
setupGraphColors2();
}
void GraphPage::setupGraphColors1()
{
m_graphColor = ControlUtil::createLabelColor(
iniUser()->graphWindowColor(), iniUser()->graphWindowDarkColor(),
@ -289,7 +295,10 @@ void GraphPage::setupGraphColors()
iniUser()->setGraphWindowDarkColorOut(v);
ctrl()->setIniUserEdited();
});
}
void GraphPage::setupGraphColors2()
{
m_graphAxisColor = ControlUtil::createLabelColor(
iniUser()->graphWindowAxisColor(), iniUser()->graphWindowDarkAxisColor(),
[&](const QColor &v) {

View File

@ -31,6 +31,8 @@ private:
QLayout *setupTrafUnitsLayout();
void setupColorsBox();
void setupGraphColors();
void setupGraphColors1();
void setupGraphColors2();
private:
QGroupBox *m_gbGraph = nullptr;