[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Bug 76757: page layout. Let me know what you think
From:       p.stirnweiss_koffice () bluewin ! ch
Date:       2004-08-11 11:47:56
Message-ID: 40F7A9ED000A800A () mssbzhb-int ! msg ! bluewin ! ch
[Download RAW message or body]

>-- Message original --
>From: Thomas Zander <zander@kde.org>
>To: For developer's discussion about KOffice <koffice-devel@mail.kde.org>
>Date: Fri, 30 Jul 2004 15:57:48 +0200
>Subject: Re: Bug 76757: page layout. Let me know what you think
>Reply-To: For developer's discussion about KOffice <koffice-devel@mail.kde.org>
>
>
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>On Friday 30 July 2004 10:29, p.stirnweiss_koffice@bluewin.ch wrote:
>> Let me know what you think.
>
>Looks good; thanks! (the one without the sliders, as attached)
>
>What bothers me with the original dialog is that the margin is multiplied
>with 
>2. This creates enormous spacing between the top of the tabs and the "All
>
>values are..", as well as between the bottom of the groupboxes and the 
>OK/Cancel buttons.
>Same goes for the 
>
>If you can; please try to remove the "times two" in: 
>"2*KDialog::marginHint()"·


It seems that there is no 2*marginHint on the main Form. These are used inside
the tabs (mainly on parag layout). Removing them is awfull because then the
orientation icons are too close to the group box title (same goes for combo
box...).

Attached are two patches. These solve the problem of over-sized forms for
KSpread.
One applies to koffice/lib/kofficeui and puts the page width and height horizontally
instead of vertically in the page layout. (this impacts all KOffice apps
that use this tab.
The other applies to koffice/kspread.dialogs and changes the position of
general print option of the options tab in page layout. This only affects
KSpread as the dialog in KSpread is a class derivated from the KoPageLayout
(can't remember the proper C++ term in english for this).

So far, I have checked KWord (related to the bug report), KPresenter, KSpread,
KChart, Kexi (also I am not sure all of the dialogs). With these two patches
applied, these apps haven't got a dialog oversized for 800x600.

Nicolas, the problem with my previous patch (with removed lines that did
not match) is most likely because I have hand modified the diff file without
correcting the number of lines that were changed. Let me know if you still
have a problem with these.

Pierre


>
>Thanks again.
>- -- 
>Thomas Zander
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.2.3 (GNU/Linux)
>
>iD8DBQFBClPfCojCW6H2z/QRAtCMAKCRU4ISbTX7UPaF+UNSrU1W26tDIwCgh6b0
>bAyyZ/NVB4oF69oFjmuGH6Q=
>=IDfG
>-----END PGP SIGNATURE-----
>
>Pièces jointes: page layout2.jpg
>
>_______________________________________________
>koffice-devel mailing list
>koffice-devel@mail.kde.org
>https://mail.kde.org/mailman/listinfo/koffice-devel


["page_layout_kspread.diff" (text/x-diff)]

Index: kspread_dlg_paperlayout.cc
===================================================================
RCS file: /home/kde/koffice/kspread/dialogs/kspread_dlg_paperlayout.cc,v
retrieving revision 1.23
diff -u -3 -p -u -p -r1.23 kspread_dlg_paperlayout.cc
--- kspread_dlg_paperlayout.cc	2 Apr 2004 05:52:13 -0000	1.23
+++ kspread_dlg_paperlayout.cc	11 Aug 2004 11:25:16 -0000
@@ -88,21 +88,21 @@ void KSpreadPaperLayout::initGeneralOpti
     QGroupBox *group = new QGroupBox( i18n("General Options"), tab );
     vbox->addWidget( group );
 
-    QVBoxLayout *optionsVbox = new QVBoxLayout( group,
+    QHBoxLayout *optionsHbox = new QHBoxLayout( group,
                                                 2 * KDialog::marginHint(),
                                                 KDialog::spacingHint() );
 
     pPrintGrid = new QCheckBox ( i18n("Print &grid"), group );
     pPrintGrid->setChecked( print->printGrid() );
-    optionsVbox->addWidget( pPrintGrid );
+    optionsHbox->addWidget( pPrintGrid );
 
     pPrintCommentIndicator = new QCheckBox ( i18n("Print &comment indicator"), group );
     pPrintCommentIndicator->setChecked( print->printCommentIndicator() );
-    optionsVbox->addWidget( pPrintCommentIndicator );
+    optionsHbox->addWidget( pPrintCommentIndicator );
 
     pPrintFormulaIndicator = new QCheckBox ( i18n("Print &formula indicator"), group );
     pPrintFormulaIndicator->setChecked( print->printFormulaIndicator() );
-    optionsVbox->addWidget( pPrintFormulaIndicator );
+    optionsHbox->addWidget( pPrintFormulaIndicator );
 }
 
 void KSpreadPaperLayout::initRanges( QWidget * tab, QVBoxLayout * vbox )

["page_layout_gen.diff" (text/x-diff)]

Index: koPageLayoutDia.cc
===================================================================
RCS file: /home/kde/koffice/lib/kofficeui/koPageLayoutDia.cc,v
retrieving revision 1.86
diff -u -3 -p -u -p -r1.86 koPageLayoutDia.cc
--- koPageLayoutDia.cc	7 Aug 2004 17:05:07 -0000	1.86
+++ koPageLayoutDia.cc	11 Aug 2004 11:24:47 -0000
@@ -316,7 +316,7 @@ void KoPageLayoutDia::setupTab1()
     // -------------- page size -----------------
     QGroupBox *formatFrame = new QGroupBox( i18n( "Page Size" ), tab1 );
     grid1->addWidget( formatFrame, 1, 0 );
-    QGridLayout *formatGrid = new QGridLayout( formatFrame, 3, 2,
+    QGridLayout *formatGrid = new QGridLayout( formatFrame, 2, 4,
        2*KDialog::marginHint(), KDialog::spacingHint() );
     formatGrid->setColStretch( 1, 1 );
 
@@ -345,12 +345,12 @@ void KoPageLayoutDia::setupTab1()
 
     // label height
     QLabel *lpgHeight = new QLabel( i18n( "&Height:" ), formatFrame );
-    formatGrid->addWidget( lpgHeight, 2, 0, Qt::AlignRight | Qt::AlignVCenter );
+    formatGrid->addWidget( lpgHeight, 1, 2, Qt::AlignRight | Qt::AlignVCenter );
 
     // linedit height
     epgHeight = new KDoubleNumInput( formatFrame, "Height" );
     lpgHeight->setBuddy( epgHeight );
-    formatGrid->addWidget( epgHeight, 2, 1, Qt::AlignLeft | Qt::AlignVCenter );
+    formatGrid->addWidget( epgHeight, 1, 3, Qt::AlignLeft | Qt::AlignVCenter );
     if ( m_layout.format != PG_CUSTOM )
         epgHeight->setEnabled( false );
     connect( epgHeight, SIGNAL( valueChanged(double ) ), this, SLOT( heightChanged() ) );


_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic