View Issue Details

IDProjectCategoryView StatusLast Update
0015241ScribusUser Interfacepublic2024-11-25 19:08
Reporterale Assigned Tonitramr  
PrioritynormalSeverityminorReproducibilityalways
Status confirmedResolutionopen 
Product Version1.5.4.svn 
Target Version1.7.0 
Summary0015241: the preferences window does not retain it's size
Description(well probably, most dialogs do not retain their size)

when i resize the preference window, i would expect it to have the same size the next time i open it.
TagsNo tags attached.
PatchYes

Activities

PeterBenedek

2019-10-23 06:25

developer   ~0046829

This behaviour in different language (in a language other than English) is very annoying.
PreferencesWindow.gif (978,150 bytes)   
PreferencesWindow.gif (978,150 bytes)   

PeterBenedek

2019-10-23 06:30

developer   ~0046830

"preferences window does not retain it's size"
PreferencesResizeWindow.gif (288,968 bytes)   
PreferencesResizeWindow.gif (288,968 bytes)   

luzpaz

2024-11-25 16:08

reporter   ~0051652

@PeterBenedek can you still reproduce in 1.7.0svn ?

PeterBenedek

2024-11-25 18:28

developer   ~0051654

Unfortunately, there is no 1.7 appimage, I can't test it. :-(

nitramr

2024-11-25 18:53

developer   ~0051655

At least I can still reproduce it in 1.7.0svn.

It's fixed now. I set a minimum width of 200.
preferencesdialogbase.ui (4,326 bytes)   
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>PreferencesDialog</class>
 <widget class="QDialog" name="PreferencesDialog">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>827</width>
    <height>586</height>
   </rect>
  </property>
  <property name="windowTitle">
   <string>Preferences</string>
  </property>
  <layout class="QVBoxLayout" name="verticalLayout">
   <property name="spacing">
    <number>8</number>
   </property>
   <property name="leftMargin">
    <number>8</number>
   </property>
   <property name="topMargin">
    <number>8</number>
   </property>
   <property name="rightMargin">
    <number>8</number>
   </property>
   <property name="bottomMargin">
    <number>8</number>
   </property>
   <item>
    <layout class="QHBoxLayout" name="frameHorizontalLayout" stretch="0,0">
     <property name="spacing">
      <number>8</number>
     </property>
     <item>
      <widget class="QListWidget" name="preferencesTypeList">
       <property name="sizePolicy">
        <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
         <horstretch>0</horstretch>
         <verstretch>0</verstretch>
        </sizepolicy>
       </property>
       <property name="minimumSize">
        <size>
         <width>200</width>
         <height>0</height>
        </size>
       </property>
       <property name="horizontalScrollBarPolicy">
        <enum>Qt::ScrollBarPolicy::ScrollBarAlwaysOff</enum>
       </property>
       <property name="editTriggers">
        <set>QAbstractItemView::EditTrigger::NoEditTriggers</set>
       </property>
       <property name="showDropIndicator" stdset="0">
        <bool>false</bool>
       </property>
       <property name="alternatingRowColors">
        <bool>true</bool>
       </property>
       <property name="iconSize">
        <size>
         <width>16</width>
         <height>16</height>
        </size>
       </property>
       <property name="flow">
        <enum>QListView::Flow::TopToBottom</enum>
       </property>
       <property name="resizeMode">
        <enum>QListView::ResizeMode::Adjust</enum>
       </property>
       <property name="spacing">
        <number>1</number>
       </property>
       <property name="wordWrap">
        <bool>true</bool>
       </property>
      </widget>
     </item>
     <item>
      <layout class="QVBoxLayout" name="verticalLayout_5">
       <property name="spacing">
        <number>9</number>
       </property>
       <item>
        <widget class="QStackedWidget" name="prefsStackWidget">
         <widget class="QWidget" name="page_2"/>
        </widget>
       </item>
       <item>
        <layout class="QHBoxLayout" name="buttonHorizontalLayout">
         <property name="leftMargin">
          <number>0</number>
         </property>
         <property name="rightMargin">
          <number>0</number>
         </property>
         <item>
          <widget class="QPushButton" name="exportButton">
           <property name="text">
            <string>Export...</string>
           </property>
           <property name="autoDefault">
            <bool>false</bool>
           </property>
          </widget>
         </item>
         <item>
          <widget class="QPushButton" name="defaultsButton">
           <property name="text">
            <string>Defaults</string>
           </property>
           <property name="autoDefault">
            <bool>false</bool>
           </property>
          </widget>
         </item>
         <item>
          <spacer name="buttonHorizontalSpacer">
           <property name="orientation">
            <enum>Qt::Orientation::Horizontal</enum>
           </property>
           <property name="sizeHint" stdset="0">
            <size>
             <width>40</width>
             <height>20</height>
            </size>
           </property>
          </spacer>
         </item>
         <item>
          <widget class="QDialogButtonBox" name="buttonBox">
           <property name="standardButtons">
            <set>QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok</set>
           </property>
          </widget>
         </item>
        </layout>
       </item>
      </layout>
     </item>
    </layout>
   </item>
  </layout>
 </widget>
 <resources/>
 <connections/>
</ui>
preferencesdialogbase.ui (4,326 bytes)   

nitramr

2024-11-25 18:57

developer   ~0051656

@PeterBenedek maybe I have a misunderstanding. I just fixed the width of the left list, so that it looks good with any dialog size. Would you expect to save the entire dialog size in preferences file too?

PeterBenedek

2024-11-25 19:02

developer   ~0051657

Hi martin,
original reporter is ale... ...I only tested it.

nitramr

2024-11-25 19:05

developer   ~0051658

Oh, right.

Anyway, if the dialog should remember it's size, someone have to apply the patch file too.
prefsdialog_2024-11-25_01.patch (1,392 bytes)   
Index: scribus/ui/preferencesdialog.cpp
===================================================================
--- scribus/ui/preferencesdialog.cpp	(Revision 26452)
+++ scribus/ui/preferencesdialog.cpp	(Arbeitskopie)
@@ -23,11 +23,10 @@
 #include "units.h"
 
 PreferencesDialog::PreferencesDialog(QWidget* parent, ApplicationPrefs& prefsData, ScribusDoc* doc)
-	: QDialog(parent),
+	: ScDialog(parent, QString::fromLocal8Bit("PreferencesDialog")),
 	m_Doc(doc)
 {
 	setupUi(this);
-	setObjectName(QString::fromLocal8Bit("PreferencesDialog"));
 	preferencesTypeList->clear();
 	while (prefsStackWidget->currentWidget() != nullptr)
 		prefsStackWidget->removeWidget(prefsStackWidget->currentWidget());
Index: scribus/ui/preferencesdialog.h
===================================================================
--- scribus/ui/preferencesdialog.h	(Revision 26452)
+++ scribus/ui/preferencesdialog.h	(Arbeitskopie)
@@ -12,8 +12,9 @@
 #include <QMap>
 #include <QStackedWidget>
 
+#include "prefsstructs.h"
 #include "scribusapi.h"
-#include "prefsstructs.h"
+#include "ui/scdialog.h"
 #include "ui_preferencesdialogbase.h"
 
 #include "ui/prefs_colormanagement.h"
@@ -52,7 +53,7 @@
 
 /*! \brief The Scribus Preferences Dialog
 */
-class SCRIBUS_API PreferencesDialog : public QDialog, Ui::PreferencesDialog
+class SCRIBUS_API PreferencesDialog : public ScDialog, Ui::PreferencesDialog
 {
 	Q_OBJECT
 

Issue History

Date Modified Username Field Change
2018-04-03 14:41 ale New Issue
2018-04-03 15:07 jghali Category - => User Interface
2019-10-23 06:25 PeterBenedek File Added: PreferencesWindow.gif
2019-10-23 06:25 PeterBenedek Note Added: 0046829
2019-10-23 06:30 PeterBenedek File Added: PreferencesResizeWindow.gif
2019-10-23 06:30 PeterBenedek Note Added: 0046830
2024-11-25 16:08 luzpaz Note Added: 0051652
2024-11-25 18:28 PeterBenedek Note Added: 0051654
2024-11-25 18:53 nitramr Note Added: 0051655
2024-11-25 18:53 nitramr File Added: preferencesdialogbase.ui
2024-11-25 18:57 nitramr Note Added: 0051656
2024-11-25 19:02 PeterBenedek Note Added: 0051657
2024-11-25 19:05 nitramr Note Added: 0051658
2024-11-25 19:05 nitramr File Added: prefsdialog_2024-11-25_01.patch
2024-11-25 19:08 nitramr Assigned To => nitramr
2024-11-25 19:08 nitramr Status new => confirmed
2024-11-25 19:08 nitramr Target Version => 1.7.0
2024-11-25 19:08 nitramr Patch No => Yes