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

List:       koffice-devel
Subject:    Re: Font handling
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2008-12-25 13:32:47
Message-ID: 200812251432.47935.t.zachmann () zagge ! de
[Download RAW message or body]

On Wednesday 24 December 2008, Thomas Zander wrote:
> On Wednesday 24. December 2008 08.28.33 Thorsten Zachmann wrote:
> > I have added a ui file. It uses the qt classes and not the kde ones as I
> > was not 100% sure how and which ones should be used. SO it is basically
> > just to give an idea on how I think it could be done. Also I'm not sure
> > we should add the label "Font". I did not find a i18n'ed string "Font:".
>
> The string 'Font' doesn't seem to add a whole lot of value; so I don't mind
> it not being there.
>
> I've used your UI file and added some code to get the fontCombo from the
> action instead of the one from Qt.
> Unfortunately in order to properly have the combobox being created from the
> action I need to make a fix in kdelibs. So when I commit it you won't see
> the actual combobox unless you are compiling against kdelibs trunk, or
> using the 4.2 release after its out.
> Its not source incompatible, you just don't see it until you upgrade :(
>
> Anyway, I hope you'll like the results when I commit it.  It needs a little
> more work in the focus handling department. Something that Pierre has been
> working on already. I'll integrate it with that before I submit to svn.

Cool for adding this that fast. There is however a small drawback with the 
dialog as it is now. It make the dialog very wide. For me it is now nearly 
double as wide as before (it has 352 pixels in width). However it is smaller 
in the toolbar. Do you thing there is anything we can do about that? 

The attached patch somehow works around the problem making the default with of 
the font selector so big. I know it is not nice but that is the only thing I 
found to make it not so wide.

Is there a chance to have the preview for the font in the combobox as it is 
there in the toolbox?

One additional thing. At the moment it is not possible to to change the font 
and so on when no text is selected. If you can give me a hint how to fix that 
I will give it try.

Thorsten


Index: SimpleStyleWidget.cpp
===================================================================
--- SimpleStyleWidget.cpp       (revision 901343)
+++ SimpleStyleWidget.cpp       (working copy)
@@ -61,6 +61,7 @@ SimpleStyleWidget::SimpleStyleWidget(Tex

     QComboBox *family = qobject_cast<QComboBox*> 
(tool->action("format_fontfamily")->requestWidget(this));
     if (family) { // kdelibs 4.1 didn't return anything here.
+        family->setMinimumSize( 150, family->sizeHint().height() );
         widget.fontsFrame->addWidget(family);
         // TODO connect to move focus away on accept
     }
_______________________________________________
koffice-devel mailing list
koffice-devel@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