Add preference to toggle file path in title bar
This commit is contained in:
parent
8f40d8f4c2
commit
71ad5cbfab
@ -74,6 +74,11 @@ void TextWindow::ScreenChangeArcDimDefault(int link, uint32_t v) {
|
|||||||
SS.arcDimDefaultDiameter = !SS.arcDimDefaultDiameter;
|
SS.arcDimDefaultDiameter = !SS.arcDimDefaultDiameter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TextWindow::ScreenChangeShowFullFilePath(int link, uint32_t v) {
|
||||||
|
SS.showFullFilePath = !SS.showFullFilePath;
|
||||||
|
SS.UpdateWindowTitles();
|
||||||
|
}
|
||||||
|
|
||||||
void TextWindow::ScreenChangeFixExportColors(int link, uint32_t v) {
|
void TextWindow::ScreenChangeFixExportColors(int link, uint32_t v) {
|
||||||
SS.fixExportColors = !SS.fixExportColors;
|
SS.fixExportColors = !SS.fixExportColors;
|
||||||
}
|
}
|
||||||
@ -351,6 +356,8 @@ void TextWindow::ShowConfiguration() {
|
|||||||
Printf(false, " %Fd%f%Ll%s arc default is diameter%E",
|
Printf(false, " %Fd%f%Ll%s arc default is diameter%E",
|
||||||
&ScreenChangeArcDimDefault,
|
&ScreenChangeArcDimDefault,
|
||||||
SS.arcDimDefaultDiameter ? CHECK_TRUE : CHECK_FALSE);
|
SS.arcDimDefaultDiameter ? CHECK_TRUE : CHECK_FALSE);
|
||||||
|
Printf(false, " %Fd%f%Ll%s show full file path in the window title%E",
|
||||||
|
&ScreenChangeShowFullFilePath, SS.showFullFilePath ? CHECK_TRUE : CHECK_FALSE);
|
||||||
Printf(false, "");
|
Printf(false, "");
|
||||||
Printf(false, "%Ft autosave interval (in minutes)%E");
|
Printf(false, "%Ft autosave interval (in minutes)%E");
|
||||||
Printf(false, "%Ba %d %Fl%Ll%f[change]%E",
|
Printf(false, "%Ba %d %Fl%Ll%f[change]%E",
|
||||||
|
@ -71,6 +71,8 @@ void SolveSpaceUI::Init() {
|
|||||||
exportOffset = settings->ThawFloat("ExportOffset", 0.0);
|
exportOffset = settings->ThawFloat("ExportOffset", 0.0);
|
||||||
// Dimensions on arcs default to diameter vs radius
|
// Dimensions on arcs default to diameter vs radius
|
||||||
arcDimDefaultDiameter = settings->ThawBool("ArcDimDefaultDiameter", false);
|
arcDimDefaultDiameter = settings->ThawBool("ArcDimDefaultDiameter", false);
|
||||||
|
// Show full file path in the menu bar
|
||||||
|
showFullFilePath = settings->ThawBool("ShowFullFilePath", true);
|
||||||
// Rewrite exported colors close to white into black (assuming white bg)
|
// Rewrite exported colors close to white into black (assuming white bg)
|
||||||
fixExportColors = settings->ThawBool("FixExportColors", true);
|
fixExportColors = settings->ThawBool("FixExportColors", true);
|
||||||
// Export background color
|
// Export background color
|
||||||
@ -254,6 +256,8 @@ void SolveSpaceUI::Exit() {
|
|||||||
settings->FreezeFloat("ExportOffset", exportOffset);
|
settings->FreezeFloat("ExportOffset", exportOffset);
|
||||||
// Rewrite the default arc dimension setting
|
// Rewrite the default arc dimension setting
|
||||||
settings->FreezeBool("ArcDimDefaultDiameter", arcDimDefaultDiameter);
|
settings->FreezeBool("ArcDimDefaultDiameter", arcDimDefaultDiameter);
|
||||||
|
// Show full file path in the menu bar
|
||||||
|
settings->FreezeBool("ShowFullFilePath", showFullFilePath);
|
||||||
// Rewrite exported colors close to white into black (assuming white bg)
|
// Rewrite exported colors close to white into black (assuming white bg)
|
||||||
settings->FreezeBool("FixExportColors", fixExportColors);
|
settings->FreezeBool("FixExportColors", fixExportColors);
|
||||||
// Export background color
|
// Export background color
|
||||||
@ -664,7 +668,11 @@ void SolveSpaceUI::UpdateWindowTitles() {
|
|||||||
GW.window->SetTitle(C_("title", "(new sketch)"));
|
GW.window->SetTitle(C_("title", "(new sketch)"));
|
||||||
} else {
|
} else {
|
||||||
if(!GW.window->SetTitleForFilename(saveFile)) {
|
if(!GW.window->SetTitleForFilename(saveFile)) {
|
||||||
|
if(SS.showFullFilePath) {
|
||||||
GW.window->SetTitle(saveFile.raw);
|
GW.window->SetTitle(saveFile.raw);
|
||||||
|
} else {
|
||||||
|
GW.window->SetTitle(saveFile.raw.substr(saveFile.raw.find_last_of("/\\") + 1));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -574,6 +574,7 @@ public:
|
|||||||
double exportScale;
|
double exportScale;
|
||||||
double exportOffset;
|
double exportOffset;
|
||||||
bool arcDimDefaultDiameter;
|
bool arcDimDefaultDiameter;
|
||||||
|
bool showFullFilePath;
|
||||||
bool fixExportColors;
|
bool fixExportColors;
|
||||||
bool exportBackgroundColor;
|
bool exportBackgroundColor;
|
||||||
bool drawBackFaces;
|
bool drawBackFaces;
|
||||||
|
1
src/ui.h
1
src/ui.h
@ -443,6 +443,7 @@ public:
|
|||||||
static void ScreenGoToWebsite(int link, uint32_t v);
|
static void ScreenGoToWebsite(int link, uint32_t v);
|
||||||
|
|
||||||
static void ScreenChangeArcDimDefault(int link, uint32_t v);
|
static void ScreenChangeArcDimDefault(int link, uint32_t v);
|
||||||
|
static void ScreenChangeShowFullFilePath(int link, uint32_t v);
|
||||||
static void ScreenChangeFixExportColors(int link, uint32_t v);
|
static void ScreenChangeFixExportColors(int link, uint32_t v);
|
||||||
static void ScreenChangeExportBackgroundColor(int link, uint32_t v);
|
static void ScreenChangeExportBackgroundColor(int link, uint32_t v);
|
||||||
static void ScreenChangeBackFaces(int link, uint32_t v);
|
static void ScreenChangeBackFaces(int link, uint32_t v);
|
||||||
|
Loading…
Reference in New Issue
Block a user