View Issue Details

IDProjectCategoryView StatusLast Update
0016882ScribusUser Interfacepublic2023-05-29 18:56
Reporterpmjdebruijn Assigned Tojghali  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.6.0.svn 
Fixed in Version1.6.0.svn 
Summary0016882: Scribus first start with tiny window
DescriptionOn first start, Scribus defaults to a roughly 640x480 window size.

One attached patch, raises the default window size to 1024x560, which should still be fine, even for Windows 10 running on a early netbook
The second patch, enables window maximization by default, as I'm guessing this is probably the first thing that most people will do after starting Scribus, so why not do it by default.

I'd suggest considering applying both patches, as the default window size still matters somewhat, when the window is unmaximized, even when maximization is default by default.
Steps To Reproduce[1] rm -rf .config/scribus
[2] rm -rf .local/share/scribus
[3] Start Scribus
TagsNo tags attached.
PatchYes

Activities

pmjdebruijn

2023-01-04 16:20

reporter  

window_size.patch (1,046 bytes)   
diff --git a/scribus/prefsmanager.cpp b/scribus/prefsmanager.cpp
index da209c15a..43b3b1aa6 100644
--- a/scribus/prefsmanager.cpp
+++ b/scribus/prefsmanager.cpp
@@ -166,6 +166,6 @@ void PrefsManager::initDefaults()
 //	appPrefs.uiPrefs.mainWinSettings.xPosition = 0;
 //	appPrefs.uiPrefs.mainWinSettings.yPosition = 0;
-	appPrefs.uiPrefs.mainWinSettings.width = 640;
-	appPrefs.uiPrefs.mainWinSettings.height = 480;
+	appPrefs.uiPrefs.mainWinSettings.width = 1024;
+	appPrefs.uiPrefs.mainWinSettings.height = 560;
 	QScreen* s = QGuiApplication::primaryScreen();
 	appPrefs.uiPrefs.mainWinSettings.xPosition = (s->availableGeometry().width() - appPrefs.uiPrefs.mainWinSettings.width) / 2;
diff --git a/scribus/prefsstructs.h b/scribus/prefsstructs.h
index 130d0e1a0..319a54866 100644
--- a/scribus/prefsstructs.h
+++ b/scribus/prefsstructs.h
@@ -96,6 +96,6 @@ struct WindowPrefs
 	int xPosition {0};
 	int yPosition {0};
-	int width {640};
-	int height {480};
+	int width {1024};
+	int height {560};
 	bool visible {true};
 	bool docked {false};
window_size.patch (1,046 bytes)   
maximized.patch (1,088 bytes)   
diff --git a/scribus/prefsmanager.cpp b/scribus/prefsmanager.cpp
index da209c15a..1a1365260 100644
--- a/scribus/prefsmanager.cpp
+++ b/scribus/prefsmanager.cpp
@@ -170,7 +170,7 @@ void PrefsManager::initDefaults()
 	QScreen* s = QGuiApplication::primaryScreen();
 	appPrefs.uiPrefs.mainWinSettings.xPosition = (s->availableGeometry().width() - appPrefs.uiPrefs.mainWinSettings.width) / 2;
 	appPrefs.uiPrefs.mainWinSettings.yPosition = (s->availableGeometry().height() - appPrefs.uiPrefs.mainWinSettings.height) / 2;
-	appPrefs.uiPrefs.mainWinSettings.maximized = false;
+	appPrefs.uiPrefs.mainWinSettings.maximized = true;
 	appPrefs.uiPrefs.mainWinState = QByteArray();
 	appPrefs.uiPrefs.RecentDocs.clear();
 	appPrefs.uiPrefs.recentDocCount = 5;
diff --git a/scribus/prefsstructs.h b/scribus/prefsstructs.h
index 130d0e1a0..6c8bd2a03 100644
--- a/scribus/prefsstructs.h
+++ b/scribus/prefsstructs.h
@@ -99,7 +99,7 @@ struct WindowPrefs
 	int height {480};
 	bool visible {true};
 	bool docked {false};
-	bool maximized {false};
+	bool maximized {true};
 	int screenNumber {0};
 };
 
maximized.patch (1,088 bytes)   

jghali

2023-01-07 22:39

administrator   ~0049861

If we decide to maximize window at first start, appPrefs.uiPrefs.mainWinSettings.width and appPrefs.uiPrefs.mainWinSettings.height should be set according to available screen geometry. However I'm not sure that on MacOS maximization by default is quite acceptable . Going to ask MrB what he thinks about that.

We could also decide to set default window size to a fraction of screen size, maybe 1/2 or 2/3. That would be better than some hardcoded calues.

jghali

2023-01-10 15:37

administrator   ~0049869

I have committed a first patch which makes Scribus use 4/5 of available screen space on first start.

pmjdebruijn

2023-01-10 17:06

reporter   ~0049871

Excellent, seems to work fine.

I've added a very minor patch, that bring the order in the .h in line with the .cpp, though you may have purposefully left this alone, I'm not sure whether this is a purely internal struct?

Also the width/height were set to 800/600 though this is slightly misleading given it's dynamically determined now, at least 0 gives a clue, it's determined elsewhere...
prefsstructs.patch (498 bytes)   
diff -Nurpd a/scribus/prefsstructs.h b/scribus/prefsstructs.h
--- a/scribus/prefsstructs.h	2023-01-10 17:26:23.000000000 +0100
+++ b/scribus/prefsstructs.h	2023-01-10 17:31:42.282088734 +0100
@@ -93,13 +93,13 @@ struct TypoPrefs
 
 struct WindowPrefs
 {
+	int width {0};
+	int height {0};
 	int xPosition {0};
 	int yPosition {0};
-	int width {800};
-	int height {600};
+	bool maximized {false};
 	bool visible {true};
 	bool docked {false};
-	bool maximized {false};
 	int screenNumber {0};
 };
 
prefsstructs.patch (498 bytes)   

jghali

2023-01-10 18:03

administrator   ~0049872

WindowPrefs width and height must not default to 0, because used as is a default initialized WindowPrefs structure would cause troubles.

jghali

2023-01-15 22:13

administrator   ~0049935

After discussion with MrB, as I expected, he has deemed that on MacOS maximizing the main window by default is indeed not acceptable. And he does not think we should do that on other platforms either. As I have no strong opinion for the Windows side of the issue, we have decided to keep the maximization default as is.

Issue History

Date Modified Username Field Change
2023-01-04 16:20 pmjdebruijn New Issue
2023-01-04 16:20 pmjdebruijn File Added: window_size.patch
2023-01-04 16:20 pmjdebruijn File Added: maximized.patch
2023-01-07 22:39 jghali Note Added: 0049861
2023-01-10 15:37 jghali Note Added: 0049869
2023-01-10 17:06 pmjdebruijn Note Added: 0049871
2023-01-10 17:06 pmjdebruijn File Added: prefsstructs.patch
2023-01-10 18:03 jghali Note Added: 0049872
2023-01-15 22:13 jghali Note Added: 0049935
2023-01-15 22:14 jghali Assigned To => jghali
2023-01-15 22:14 jghali Status new => resolved
2023-01-15 22:14 jghali Resolution open => fixed
2023-01-15 22:14 jghali Fixed in Version => 1.6.0.svn
2023-05-29 18:56 cbradney Status resolved => closed