View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0016458 | Scribus | User Interface | public | 2021-02-03 22:34 | 2021-03-21 15:10 |
Reporter | bubu | Assigned To | jghali | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.5.7.svn | ||||
Fixed in Version | 1.5.7.svn | ||||
Summary | 0016458: Unify window margin for file open/save/export dialog | ||||
Description | Finally I found the solution to remove unnecessary double 9px margin around file dialog. Affected dialogs: - File > Open - File > Save /Save As - File > Save as Template - File > Collect for Output - File > Export > As Text - File > Export > As EPS - File > Export > As SVG - File > Export > As XPS I propose the attached patch. The main solution is this line "fileDialog->layout()->setContentsMargins(0, 0, 0, 0);". Please review. Thanks! | ||||
Tags | No tags attached. | ||||
Patch | |||||
child of | 0013906 | acknowledged | Metabug: UI enhancement proposals (1.5.x.svn) |
|
0001-Unify-window-margin-for-file-open-save-export-dialog.patch (5,908 bytes)
From f420e2596bb2bec14949f41734193387328e8ea1 Mon Sep 17 00:00:00 2001 Message-Id: <f420e2596bb2bec14949f41734193387328e8ea1.1612391154.git.bubu@ujevangelizacio.hu> From: =?UTF-8?q?Gyuris=20Gell=C3=A9rt?= <bubu@ujevangelizacio.hu> Date: Wed, 3 Feb 2021 23:25:44 +0100 Subject: [PATCH] Unify window margin for file open/save/export dialog --- .../plugins/export/xpsexport/xpsexplugin.cpp | 3 +- scribus/ui/customfdialog.cpp | 46 ++++++++++--------- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/scribus/plugins/export/xpsexport/xpsexplugin.cpp b/scribus/plugins/export/xpsexport/xpsexplugin.cpp index 9adcec711..004638823 100644 --- a/scribus/plugins/export/xpsexport/xpsexplugin.cpp +++ b/scribus/plugins/export/xpsexport/xpsexplugin.cpp @@ -139,7 +139,8 @@ bool XPSExportPlugin::run(ScribusDoc* doc, const QString& filename) QFrame *Layout = new QFrame(openDia.data()); QHBoxLayout *Layout1 = new QHBoxLayout(Layout); - Layout1->setSpacing( 5 ); + Layout1->setSpacing(6); + Layout1->setContentsMargins(0, 0, 0, 0); QLabel *text = new QLabel(QObject::tr("Output Settings:"), Layout); Layout1->addWidget(text); QComboBox* compress = new QComboBox(Layout); diff --git a/scribus/ui/customfdialog.cpp b/scribus/ui/customfdialog.cpp index c4076776f..1045bed50 100644 --- a/scribus/ui/customfdialog.cpp +++ b/scribus/ui/customfdialog.cpp @@ -288,21 +288,23 @@ CustomFDialog::CustomFDialog(QWidget *parent, const QString& wDir, const QString setWindowTitle(caption); setWindowIcon(IconManager::instance().loadIcon("AppIcon.png")); vboxLayout = new QVBoxLayout(this); - vboxLayout->setSpacing(5); - vboxLayout->setMargin(10); - hboxLayout = new QHBoxLayout; - hboxLayout->setSpacing(5); - hboxLayout->setMargin(0); + vboxLayout->setSpacing(6); + vboxLayout->setContentsMargins(9, 9, 9, 9); + hboxLayout = new QHBoxLayout; + hboxLayout->setSpacing(6); + hboxLayout->setContentsMargins(0, 0, 0, 0); fileDialog = new ScFileWidget(this); - hboxLayout->addWidget(fileDialog); + // The margins' content should be set both on the widget and its layout. + fileDialog->setContentsMargins(0, 0, 0, 0); + fileDialog->layout()->setContentsMargins(0, 0, 0, 0); fileDialog->setIconProvider(new ImIconProvider()); fileDialog->setNameFilter(filter); fileDialog->selectNameFilter(filter); fileDialog->setDirectory(wDir); + hboxLayout->addWidget(fileDialog); vboxLayout1 = new QVBoxLayout; - vboxLayout1->setSpacing(0); - vboxLayout1->setMargin(0); - vboxLayout1->setContentsMargins(0, 37, 0, 0); + vboxLayout1->setSpacing(6); + vboxLayout1->setContentsMargins(0, 28, 0, 0); vboxLayout1->setAlignment( Qt::AlignTop ); filePreview = new FDialogPreview( this ); filePreview->setMinimumSize(QSize(200, 200)); @@ -310,9 +312,9 @@ CustomFDialog::CustomFDialog(QWidget *parent, const QString& wDir, const QString vboxLayout1->addWidget(filePreview); hboxLayout->addLayout(vboxLayout1); vboxLayout->addLayout(hboxLayout); - QHBoxLayout *hboxLayout1 = new QHBoxLayout; - hboxLayout1->setSpacing(5); - hboxLayout1->setContentsMargins(9, 0, 0, 0); + QHBoxLayout *hboxLayout1 = new QHBoxLayout; + hboxLayout1->setSpacing(6); + hboxLayout1->setContentsMargins(0, 0, 0, 0); showPreview = new QCheckBox(this); showPreview->setText( tr("Show Preview")); showPreview->setToolTip( tr("Show a preview and information for the selected file")); @@ -335,8 +337,8 @@ CustomFDialog::CustomFDialog(QWidget *parent, const QString& wDir, const QString { Layout = new QFrame(this); Layout1 = new QHBoxLayout(Layout); - Layout1->setSpacing( 0 ); - Layout1->setContentsMargins(9, 0, 0, 0); + Layout1->setSpacing(6); + Layout1->setContentsMargins(0, 0, 0, 0); saveZip = new QCheckBox( tr( "&Compress File" ), Layout); Layout1->addWidget(saveZip, Qt::AlignLeft); QSpacerItem* spacer = new QSpacerItem( 2, 2, QSizePolicy::Expanding, QSizePolicy::Minimum ); @@ -344,8 +346,8 @@ CustomFDialog::CustomFDialog(QWidget *parent, const QString& wDir, const QString vboxLayout->addWidget(Layout); LayoutC = new QFrame(this); Layout1C = new QHBoxLayout(LayoutC); - Layout1C->setSpacing( 0 ); - Layout1C->setContentsMargins(9, 0, 0, 0); + Layout1C->setSpacing(6); + Layout1C->setContentsMargins(0, 0, 0, 0); withFonts = new QCheckBox( tr( "&Include Fonts" ), LayoutC); Layout1C->addWidget(withFonts, Qt::AlignLeft); withProfiles = new QCheckBox( tr( "&Include Color Profiles" ), LayoutC); @@ -366,8 +368,8 @@ CustomFDialog::CustomFDialog(QWidget *parent, const QString& wDir, const QString { Layout = new QFrame(this); Layout1 = new QHBoxLayout(Layout); - Layout1->setSpacing( 5 ); - Layout1->setContentsMargins(9, 0, 0, 0); + Layout1->setSpacing(6); + Layout1->setContentsMargins(0, 0, 0, 0); saveZip = new QCheckBox( tr( "&Compress File" ), Layout); Layout1->addWidget(saveZip); QSpacerItem* spacer = new QSpacerItem( 2, 2, QSizePolicy::Expanding, QSizePolicy::Minimum ); @@ -395,8 +397,8 @@ CustomFDialog::CustomFDialog(QWidget *parent, const QString& wDir, const QString { LayoutC = new QFrame(this); Layout1C = new QHBoxLayout(LayoutC); - Layout1C->setSpacing( 0 ); - Layout1C->setContentsMargins(9, 0, 0, 0); + Layout1C->setSpacing(6); + Layout1C->setContentsMargins(0, 0, 0, 0); optionLabel = new QLabel(this); optionLabel->setText( tr("Encoding:")); Layout1C->addWidget(optionLabel); @@ -441,8 +443,8 @@ CustomFDialog::CustomFDialog(QWidget *parent, const QString& wDir, const QString { LayoutC = new QFrame(this); Layout1C = new QHBoxLayout(LayoutC); - Layout1C->setSpacing( 0 ); - Layout1C->setContentsMargins(9, 0, 0, 0); + Layout1C->setSpacing(6); + Layout1C->setContentsMargins(0, 0, 0, 0); optionLabel = new QLabel(this); optionLabel->setText( tr("Import Option:")); Layout1C->addWidget(optionLabel); -- 2.27.0 |
|
|
|
Applied, thanks! I did an additional change in customfdialog.cpp and scfilewidget.cpp in order to also fix text import dialog. |
|
Thanks! Fixed in 1.5.7.svn (24444) |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-02-03 22:34 | bubu | New Issue | |
2021-02-03 22:34 | bubu | File Added: 0001-Unify-window-margin-for-file-open-save-export-dialog.patch | |
2021-02-03 22:34 | bubu | File Added: collect_for_output_&_save_as_template.gif | |
2021-02-03 22:34 | bubu | File Added: export_as_text.gif | |
2021-02-03 22:34 | bubu | File Added: file_open.gif | |
2021-02-03 22:34 | bubu | File Added: file_open_preview.gif | |
2021-02-03 22:34 | bubu | File Added: save_as.gif | |
2021-02-03 22:34 | bubu | File Added: save_as_eps.gif | |
2021-02-03 22:34 | bubu | File Added: save_as_svg.gif | |
2021-02-03 23:06 | bubu | File Added: save_as_xps.gif | |
2021-02-04 05:30 | PeterBenedek | Relationship added | child of 0013906 |
2021-02-04 21:31 | jghali | Assigned To | => jghali |
2021-02-04 21:31 | jghali | Status | new => resolved |
2021-02-04 21:31 | jghali | Resolution | open => fixed |
2021-02-04 21:31 | jghali | Fixed in Version | => 1.5.7.svn |
2021-02-04 21:31 | jghali | Note Added: 0048804 | |
2021-03-21 15:10 | FirasH | Status | resolved => closed |
2021-03-21 15:10 | FirasH | Note Added: 0048998 |