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

List:       kde-core-devel
Subject:    Re: [PATCH] KUrlNavigator -> mark currently selected subdir (with
From:       Peter Penz <peter.penz () gmx ! at>
Date:       2008-12-19 6:23:46
Message-ID: 200812190723.46626.peter.penz () gmx ! at
[Download RAW message or body]

On Friday, 19. December 2008 00:09:50 C. Boemann wrote:
[...]
> > > It works nicely on styles that are not Oxygen. But Oxygen ignores the
> > > action's font. Is that how it should be? Shouldn't Oxygen use the
> > > action's font to render the text?
> >
> > I've set Casper Boemann and Huynh Huu Long to CC, they should know
> > whether
> > this has been done on purpose or is a minor issue.
[...]
> I'm a bit lost here. Could the patch please be forwarded too.

I've attached the patch from Sebastian: An action with a bold fold is attached 
to a KMenu.

> But I don't think we have forced any font in Oxygen.
>
> best regards
> Casper


["kurlnavigatorbutton.diff" (text/x-patch)]

Index: kurlnavigatorbutton.cpp
===================================================================
--- kurlnavigatorbutton.cpp	(revision 896737)
+++ kurlnavigatorbutton.cpp	(working copy)
@@ -369,9 +369,15 @@
     KMenu* dirsMenu = new KMenu(this);
     dirsMenu->setLayoutDirection(Qt::LeftToRight);
     int i = 0;
+    QString selectedSubdir = urlNavigator()->url(m_index+1).fileName();
     foreach (const QString& subdir, m_subdirs) {
         const QString text = KStringHandler::csqueeze(subdir, 60);
         QAction* action = new QAction(text, this);
+        if (selectedSubdir == subdir) {
+            QFont fnt(action->font());
+            fnt.setBold(true);
+            action->setFont(fnt);
+        }
         action->setData(i);
         dirsMenu->addAction(action);
         ++i;


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

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