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

List:       kde-kimageshop
Subject:    Re: bug fix : 251622
From:       Valentin Cheillon <cheillonvalentin () gmail ! com>
Date:       2011-03-21 8:05:03
Message-ID: AANLkTikRh-YYyqYACDe3ZVtuLzsHTZUt_5iQmz8uZEwt () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hello,
My last fix was not screen resolution dependant ( I just got lucky when I
tested ), This one is resolution dependant but the centering is still not
perfect
because some dialogs expand dynamically just after I positionned them. Here
is a screen : http://img851.imageshack.us/i/filterdialogcenterwithw.png/
and the patch is enclosed. If you want it to be perfectly centered, I will
investigate further.
Thanks

2011/3/19 Valentin Cheillon <cheillonvalentin@gmail.com>

> Hi again,
> As Sven told me, there will be two different patches: one for the centering
> of the dialogs, the other for removing
> the margins inside the level filter dialog.
> This is the patch for the first one. The centering is not perfect because I
> don't understand all qt positioning mechanisms.
> But I guess the result is still correct.
>
> 2011/3/19 Sven Langkamp <sven.langkamp@gmail.com>
>
>> On Sat, Mar 19, 2011 at 3:10 PM, Valentin Cheillon <
>> cheillonvalentin@gmail.com> wrote:
>>
>>> Hello everyone,
>>>
>>> I tried to fix this bug  http://bugs.kde.org/251622.
>>> It was just about modifying properties with qtDesigner
>>> I Hope the patch fits your needs because it was just about qt layout
>>> management and I am not a pro on it.
>>> You can find the patch attached done with git diff.
>>>
>>
>> The patch only decreases the size of the widget, but the dialog is still
>> too big.
>> See http://i.imgur.com/Ydv5U.png
>>
>> _______________________________________________
>> kimageshop mailing list
>> kimageshop@kde.org
>> https://mail.kde.org/mailman/listinfo/kimageshop
>>
>>
>

[Attachment #5 (text/html)]

Hello,<br>My last fix was not screen resolution dependant ( I just got lucky when I \
tested ), This one is resolution dependant but the centering is still not \
perfect<br>because some dialogs expand dynamically just after I positionned them. \
Here is a screen : <a \
href="http://img851.imageshack.us/i/filterdialogcenterwithw.png/">http://img851.imageshack.us/i/filterdialogcenterwithw.png/</a><br>
 and the patch is enclosed. If you want it to be perfectly centered, I will \
investigate further.<br>Thanks<br><br><div class="gmail_quote">2011/3/19 Valentin \
Cheillon <span dir="ltr">&lt;<a \
href="mailto:cheillonvalentin@gmail.com">cheillonvalentin@gmail.com</a>&gt;</span><br>
 <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px \
solid rgb(204, 204, 204); padding-left: 1ex;">Hi again,<br>As Sven told me, there \
will be two different patches: one for the centering of the dialogs, the other for \
removing<br> the margins inside the level filter dialog.<br>This is the patch for the \
first one. The centering is not perfect because I don&#39;t understand all qt \
positioning mechanisms.<br> But I guess the result is still correct.<br><br><div \
class="gmail_quote"><div><div></div><div class="h5">2011/3/19 Sven Langkamp <span \
dir="ltr">&lt;<a href="mailto:sven.langkamp@gmail.com" \
target="_blank">sven.langkamp@gmail.com</a>&gt;</span><br> </div></div><blockquote \
class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, \
204, 204); padding-left: 1ex;"><div><div></div><div class="h5"> \
<div><div></div><div><div class="gmail_quote">On Sat, Mar 19, 2011 at 3:10 PM, \
Valentin Cheillon <span dir="ltr">&lt;<a href="mailto:cheillonvalentin@gmail.com" \
target="_blank">cheillonvalentin@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px \
solid rgb(204, 204, 204); padding-left: 1ex;"> Hello everyone,<br><br>I tried to fix \
this bug  <a href="http://bugs.kde.org/251622" \
target="_blank">http://bugs.kde.org/251622</a>.<br>It was just about modifying \
properties with qtDesigner<br>I Hope the patch fits your needs because it was just \
about qt layout management and I am not a pro on it.<br>



You can find the patch attached done with git \
diff.<br></blockquote></div><br></div></div>The patch only decreases the size of the \
widget, but the dialog is still too big.<br>See <a \
href="http://i.imgur.com/Ydv5U.png" \
target="_blank">http://i.imgur.com/Ydv5U.png</a><br>


<br></div></div>_______________________________________________<br>
kimageshop mailing list<br>
<a href="mailto:kimageshop@kde.org" target="_blank">kimageshop@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kimageshop" \
target="_blank">https://mail.kde.org/mailman/listinfo/kimageshop</a><br> \
<br></blockquote></div><br> </blockquote></div><br>

--000e0cd23b84c5a2f6049ef99562--


["centering_bug.patch" (text/x-patch)]

diff --git a/krita/ui/kis_filter_handler.cc b/krita/ui/kis_filter_handler.cc
index 2705b9d..ce482c7 100644
--- a/krita/ui/kis_filter_handler.cc
+++ b/krita/ui/kis_filter_handler.cc
@@ -131,6 +131,12 @@ void KisFilterHandler::showDialog()
                 SLOT(apply(KisNodeSP, KisFilterConfiguration*)));
         dialog->setVisible(true);
         dialog->setAttribute(Qt::WA_DeleteOnClose);
+
+        //positionning the widget to the center
+        int x=m_d->view->geometry().x()+m_d->view->geometry().width()/2-dialog->width()/2;
 +        int y=m_d->view->geometry().y()+m_d->view->geometry().height()/2-dialog->height()/2;
 +        dialog->setGeometry(x,y,dialog->width(),dialog->height());
+
     } else {
         apply(m_d->view->activeNode(), \
m_d->filter->defaultConfiguration(m_d->view->activeNode()->original()));  }



_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop


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

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