Eliminate a redundancy
This commit is contained in:
parent
c6f7e81b70
commit
e8f967c462
1 changed files with 1 additions and 7 deletions
|
|
@ -400,7 +400,6 @@ void Editor::Impl::createFrameContents()
|
||||||
box->setTitleFontColor(theme->titleBoxText);
|
box->setTitleFontColor(theme->titleBoxText);
|
||||||
box->setTitleBackgroundColor(theme->titleBoxBackground);
|
box->setTitleBackgroundColor(theme->titleBoxBackground);
|
||||||
auto font = owned(new CFontDesc("Roboto", fontsize));
|
auto font = owned(new CFontDesc("Roboto", fontsize));
|
||||||
font->setSize(fontsize);
|
|
||||||
box->setTitleFont(font);
|
box->setTitleFont(font);
|
||||||
return box;
|
return box;
|
||||||
};
|
};
|
||||||
|
|
@ -414,7 +413,6 @@ void Editor::Impl::createFrameContents()
|
||||||
lbl->setFontColor(theme->text);
|
lbl->setFontColor(theme->text);
|
||||||
lbl->setHoriAlign(align);
|
lbl->setHoriAlign(align);
|
||||||
auto font = owned(new CFontDesc("Roboto", fontsize));
|
auto font = owned(new CFontDesc("Roboto", fontsize));
|
||||||
font->setSize(fontsize);
|
|
||||||
lbl->setFont(font);
|
lbl->setFont(font);
|
||||||
return lbl;
|
return lbl;
|
||||||
};
|
};
|
||||||
|
|
@ -435,7 +433,6 @@ void Editor::Impl::createFrameContents()
|
||||||
lbl->setFontColor(theme->text);
|
lbl->setFontColor(theme->text);
|
||||||
lbl->setHoriAlign(align);
|
lbl->setHoriAlign(align);
|
||||||
auto font = owned(new CFontDesc("Roboto", fontsize));
|
auto font = owned(new CFontDesc("Roboto", fontsize));
|
||||||
font->setSize(fontsize);
|
|
||||||
lbl->setFont(font);
|
lbl->setFont(font);
|
||||||
return lbl;
|
return lbl;
|
||||||
};
|
};
|
||||||
|
|
@ -448,8 +445,7 @@ void Editor::Impl::createFrameContents()
|
||||||
#if 0
|
#if 0
|
||||||
auto createButton = [this](const CRect& bounds, int tag, const char* label, CHoriTxtAlign align, int fontsize) {
|
auto createButton = [this](const CRect& bounds, int tag, const char* label, CHoriTxtAlign align, int fontsize) {
|
||||||
CTextButton* button = new CTextButton(bounds, this, tag, label);
|
CTextButton* button = new CTextButton(bounds, this, tag, label);
|
||||||
auto font = owned(new CFontDesc(*button->getFont()));
|
auto font = owned(new CFontDesc("Roboto", fontsize));
|
||||||
font->setSize(fontsize);
|
|
||||||
button->setFont(font);
|
button->setFont(font);
|
||||||
button->setTextAlignment(align);
|
button->setTextAlignment(align);
|
||||||
return button;
|
return button;
|
||||||
|
|
@ -458,7 +454,6 @@ void Editor::Impl::createFrameContents()
|
||||||
auto createValueButton = [this, &theme](const CRect& bounds, int tag, const char* label, CHoriTxtAlign align, int fontsize) {
|
auto createValueButton = [this, &theme](const CRect& bounds, int tag, const char* label, CHoriTxtAlign align, int fontsize) {
|
||||||
CTextButton* button = new CTextButton(bounds, this, tag, label);
|
CTextButton* button = new CTextButton(bounds, this, tag, label);
|
||||||
auto font = owned(new CFontDesc("Roboto", fontsize));
|
auto font = owned(new CFontDesc("Roboto", fontsize));
|
||||||
font->setSize(fontsize);
|
|
||||||
button->setFont(font);
|
button->setFont(font);
|
||||||
button->setTextAlignment(align);
|
button->setTextAlignment(align);
|
||||||
button->setTextColor(theme->valueText);
|
button->setTextColor(theme->valueText);
|
||||||
|
|
@ -472,7 +467,6 @@ void Editor::Impl::createFrameContents()
|
||||||
SValueMenu* vm = new SValueMenu(bounds, this, tag);
|
SValueMenu* vm = new SValueMenu(bounds, this, tag);
|
||||||
vm->setHoriAlign(align);
|
vm->setHoriAlign(align);
|
||||||
auto font = owned(new CFontDesc("Roboto", fontsize));
|
auto font = owned(new CFontDesc("Roboto", fontsize));
|
||||||
font->setSize(fontsize);
|
|
||||||
vm->setFont(font);
|
vm->setFont(font);
|
||||||
vm->setFontColor(theme->valueText);
|
vm->setFontColor(theme->valueText);
|
||||||
vm->setBackColor(theme->valueBackground);
|
vm->setBackColor(theme->valueBackground);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue