From 2acd412f10e1fd7ca80e46ccbeae6d31bb70655a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Br=C3=A6strup=20Sayoc?= Date: Thu, 3 Oct 2024 21:28:55 +0200 Subject: [PATCH] [Gui] Add ability to change axis colors --- src/Gui/PreferencePackTemplates/View.cfg | 3 + src/Gui/PreferencePages/DlgSettings3DView.ui | 111 ++++++++++++++++++ .../PreferencePages/DlgSettings3DViewImp.cpp | 8 ++ 3 files changed, 122 insertions(+) diff --git a/src/Gui/PreferencePackTemplates/View.cfg b/src/Gui/PreferencePackTemplates/View.cfg index a7357e70cb..8c2392fb2c 100644 --- a/src/Gui/PreferencePackTemplates/View.cfg +++ b/src/Gui/PreferencePackTemplates/View.cfg @@ -14,6 +14,9 @@ + + + diff --git a/src/Gui/PreferencePages/DlgSettings3DView.ui b/src/Gui/PreferencePages/DlgSettings3DView.ui index bac76fd636..a37f8cbc28 100644 --- a/src/Gui/PreferencePages/DlgSettings3DView.ui +++ b/src/Gui/PreferencePages/DlgSettings3DView.ui @@ -122,6 +122,117 @@ in the corner -- in % of height/width of viewport + + + + + + X-axis color + + + + + + + + + + AxisXColor + + + View + + + + 204 + 51 + 51 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Y-axis color + + + + + + + + + + AxisYColor + + + View + + + + 51 + 204 + 51 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Z-axis color + + + + + + + + + + AxisZColor + + + View + + + + 51 + 51 + 204 + + + + + + diff --git a/src/Gui/PreferencePages/DlgSettings3DViewImp.cpp b/src/Gui/PreferencePages/DlgSettings3DViewImp.cpp index 47775784ba..35112bc81c 100644 --- a/src/Gui/PreferencePages/DlgSettings3DViewImp.cpp +++ b/src/Gui/PreferencePages/DlgSettings3DViewImp.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include "DlgSettings3DViewImp.h" #include "ui_DlgSettings3DView.h" @@ -74,6 +75,9 @@ void DlgSettings3DViewImp::saveSettings() ui->sliderIntensity->onSave(); ui->radioPerspective->onSave(); ui->radioOrthographic->onSave(); + ui->xAxisColor->onSave(); + ui->yAxisColor->onSave(); + ui->zAxisColor->onSave(); } void DlgSettings3DViewImp::loadSettings() @@ -92,6 +96,9 @@ void DlgSettings3DViewImp::loadSettings() ui->radioPerspective->onRestore(); ui->radioOrthographic->onRestore(); ui->comboTransparentRender->onRestore(); + ui->xAxisColor->onRestore(); + ui->yAxisColor->onRestore(); + ui->zAxisColor->onRestore(); loadAntiAliasing(); loadRenderCache(); @@ -240,3 +247,4 @@ void DlgSettings3DViewImp::onAliasingChanged(int index) #include "moc_DlgSettings3DViewImp.cpp" +