GUI: add settings to round tabs and scrollbars

This commit is contained in:
tildearrow 2024-01-16 22:01:17 -05:00
parent 88b42ddd58
commit 95aff38cb2
2 changed files with 32 additions and 0 deletions

View file

@ -1619,6 +1619,8 @@ class FurnaceGUI {
int roundedWindows;
int roundedButtons;
int roundedMenus;
int roundedTabs;
int roundedScrollbars;
int loadJapanese;
int loadChinese;
int loadChineseTraditional;
@ -1817,6 +1819,8 @@ class FurnaceGUI {
roundedWindows(1),
roundedButtons(1),
roundedMenus(0),
roundedTabs(1),
roundedScrollbars(1),
loadJapanese(0),
loadChinese(0),
loadChineseTraditional(0),

View file

@ -3192,6 +3192,18 @@ void FurnaceGUI::drawSettings() {
settingsChanged=true;
}
bool roundedTabsB=settings.roundedTabs;
if (ImGui::Checkbox("Rounded tabs",&roundedTabsB)) {
settings.roundedTabs=roundedTabsB;
settingsChanged=true;
}
bool roundedScrollbarsB=settings.roundedScrollbars;
if (ImGui::Checkbox("Rounded scrollbars",&roundedScrollbarsB)) {
settings.roundedScrollbars=roundedScrollbarsB;
settingsChanged=true;
}
bool frameBordersB=settings.frameBorders;
if (ImGui::Checkbox("Borders around widgets",&frameBordersB)) {
settings.frameBorders=frameBordersB;
@ -3943,6 +3955,8 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
settings.roundedWindows=conf.getInt("roundedWindows",1);
settings.roundedButtons=conf.getInt("roundedButtons",1);
settings.roundedMenus=conf.getInt("roundedMenus",0);
settings.roundedTabs=conf.getInt("roundedTabs",1);
settings.roundedScrollbars=conf.getInt("roundedScrollbars",1);
settings.separateFMColors=conf.getInt("separateFMColors",0);
settings.insEditColorize=conf.getInt("insEditColorize",0);
@ -4108,6 +4122,8 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
clampSetting(settings.roundedWindows,0,1);
clampSetting(settings.roundedButtons,0,1);
clampSetting(settings.roundedMenus,0,1);
clampSetting(settings.roundedTabs,0,1);
clampSetting(settings.roundedScrollbars,0,1);
clampSetting(settings.loadJapanese,0,1);
clampSetting(settings.loadChinese,0,1);
clampSetting(settings.loadChineseTraditional,0,1);
@ -4401,6 +4417,8 @@ void FurnaceGUI::writeConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
conf.set("roundedWindows",settings.roundedWindows);
conf.set("roundedButtons",settings.roundedButtons);
conf.set("roundedMenus",settings.roundedMenus);
conf.set("roundedTabs",settings.roundedTabs);
conf.set("roundedScrollbars",settings.roundedScrollbars);
conf.set("separateFMColors",settings.separateFMColors);
conf.set("insEditColorize",settings.insEditColorize);
@ -5175,6 +5193,16 @@ void FurnaceGUI::applyUISettings(bool updateFonts) {
sty.GrabRounding=6.0f;
}
if (settings.roundedMenus) sty.PopupRounding=8.0f;
if (settings.roundedTabs) {
sty.TabRounding=4.0f;
} else {
sty.TabRounding=0.0f;
}
if (settings.roundedScrollbars) {
sty.ScrollbarRounding=9.0f;
} else {
sty.ScrollbarRounding=0.0f;
}
if (settings.frameBorders) {
sty.FrameBorderSize=1.0f;