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

List:       kde-kimageshop
Subject:    Re: Junior Job (Bug 245658)
From:       Koushik S <skoushik333 () gmail ! com>
Date:       2014-03-26 18:21:36
Message-ID: CAEwJJ=REyWd+2-1uksXYv1rxBGSJ=HxJU3u-88x-PZHQrcvqEw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,

    Yes, a real-time update would be nice, and actually I thought that
would be the effect. But there seems to be some additional code which
prevents that from happening, I think (There's a comment on it that it's
used to handle a bug).

    I'm trying to figure out what causes the late update, and will soon
work on it.


On Wed, Mar 26, 2014 at 10:56 PM, Sven Langkamp <sven.langkamp@gmail.com>wrote:

> NIce. It would be nice is it would update in real-time like the color
> color choosers.
>
>
> On Tue, Mar 25, 2014 at 12:37 PM, Koushik S <skoushik333@gmail.com> wrote:
>
>> Thanks for the feedback, David.
>>
>> Here's the updated look : http://i.imgur.com/84Q2n60.png
>>
>> I'm not exactly sure if it was the right way to do it. I just decreased
>> the color area, while keeping the mask region the same, which seems to be
>> the same way the border around the palette is generated.
>>
>>
>> On Tue, Mar 25, 2014 at 2:21 PM, David Revoy <davidrevoy@gmail.com>wrote:
>>
>>> Hi, it does look good to me. :-)
>>> ( only crit : maybe it needs also a black outline around, as the main
>>> widget got one too )
>>>
>>> _____________________
>>> http://www.davidrevoy.com
>>>
>>>
>>> On Mon, Mar 24, 2014 at 6:58 PM, Koushik S <skoushik333@gmail.com>wrote:
>>>
>>>> Hi,
>>>>
>>>>     I was working on and off on this bug, and here are the developments
>>>> on this so far. I have been able to create a separate area for the FG
>>>> colour to be displayed.
>>>>
>>>>     Here's what I've come up with so far:
>>>> http://i.imgur.com/UqyjdZl.png
>>>>
>>>>     Any feedbacks are welcomed.
>>>>
>>>>
>>>> On Sat, Mar 15, 2014 at 7:22 PM, Koushik S <skoushik333@gmail.com>wrote:
>>>>
>>>>>
>>>>> On Sat, Mar 15, 2014 at 4:57 PM, Sven Langkamp <
>>>>> sven.langkamp@gmail.com> wrote:
>>>>>
>>>>>> It's hard to tell what you are trying to do. Can you attach the code
>>>>>> and a screenshot?
>>>>>
>>>>>
>>>>> Sure. Here's the code snippet I added in the paintEvent.
>>>>>
>>>>> <code>
>>>>> //painting foreground color
>>>>>     QPainterPath path2;
>>>>>     path2.addEllipse(QPoint(180,180), colorInnerRadius-25,
>>>>> colorInnerRadius - 25);
>>>>>     painter.fillPath(path2, m_triangleColorSelector->color());
>>>>>     painter.drawPath(path2);
>>>>> </code>
>>>>>
>>>>> I've also added in some modifications to the masks. The size of the
>>>>> masks and also the path are arbitrary and are just used for testing.
>>>>>
>>>>> <code>
>>>>>     int side = qMin(width()/2, height()/2);
>>>>>     int side2 = qMin(width()/2, height()/2);
>>>>>     QRegion maskedRegion (width()/2 - side/2, height()/2 - side/2,
>>>>> side, side, QRegion::Ellipse);
>>>>>     QRegion maskedRegion2 (180 - side2/2, 180 - side2/2 , side2,
>>>>> side2, QRegion::Ellipse);
>>>>>     setMask(maskedRegion + maskedRegion2);
>>>>> </code>
>>>>>
>>>>> These wouldn't work since, the QRect which houses only the popup
>>>>> palette. I couldn't figure out the part of the code which changes the QRect
>>>>> size.
>>>>>
>>>>> But, as I've been going through it, changing the size in the
>>>>> sizeHint() method seems to change the overall size of the widget i.e., it
>>>>> enlarges it. So, I probably should change most of the code which calculates
>>>>> the relative positions of the favourite brushes and so on. Is it the right
>>>>> way to do it?
>>>>>
>>>>> --
>>>>> regards,
>>>>> Koushik. S
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> regards,
>>>> Koushik. S
>>>>
>>>> _______________________________________________
>>>> Krita mailing list
>>>> kimageshop@kde.org
>>>> https://mail.kde.org/mailman/listinfo/kimageshop
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Krita mailing list
>>> kimageshop@kde.org
>>> https://mail.kde.org/mailman/listinfo/kimageshop
>>>
>>>
>>
>>
>> --
>> regards,
>> Koushik. S
>>
>> _______________________________________________
>> Krita mailing list
>> kimageshop@kde.org
>> https://mail.kde.org/mailman/listinfo/kimageshop
>>
>>
>
> _______________________________________________
> Krita mailing list
> kimageshop@kde.org
> https://mail.kde.org/mailman/listinfo/kimageshop
>
>


-- 
regards,
Koushik. S

[Attachment #5 (text/html)]

<div dir="ltr"><div><div>Hi,<br><br></div>    Yes, a real-time update would be nice, \
and actually I thought that would be the effect. But there seems to be some \
additional code which prevents that from happening, I think (There&#39;s a comment on \
it that it&#39;s used to handle a bug).<br>  <br></div>    I&#39;m trying to figure \
out what causes the late update, and will soon work on it. <br></div><div \
class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 26, 2014 at 10:56 \
PM, Sven Langkamp <span dir="ltr">&lt;<a href="mailto:sven.langkamp@gmail.com" \
target="_blank">sven.langkamp@gmail.com</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">NIce. It would be nice is it would update in \
real-time like the color color choosers.</div><div class="HOEnZb"> <div \
class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 25, \
2014 at 12:37 PM, Koushik S <span dir="ltr">&lt;<a \
href="mailto:skoushik333@gmail.com" \
target="_blank">skoushik333@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div><div><div>Thanks for the feedback, \
David.<br><br></div>Here&#39;s the updated look : <a \
href="http://i.imgur.com/84Q2n60.png" \
target="_blank">http://i.imgur.com/84Q2n60.png</a><br>

<br></div>I&#39;m not exactly sure if it was the right way to do it. I just decreased \
the color area, while keeping the mask region the same, which seems to be the same \
way the border around the palette is generated. <br>


</div></div><div class="gmail_extra"><div><div><br><br><div class="gmail_quote">On \
Tue, Mar 25, 2014 at 2:21 PM, David Revoy <span dir="ltr">&lt;<a \
href="mailto:davidrevoy@gmail.com" \
target="_blank">davidrevoy@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div>Hi, it does look good to me. \
:-)<br></div>( only crit : maybe it needs also a black outline around, as the main \
widget got one too )<br>


</div><div class="gmail_extra"><br clear="all"><div><font size="1"><span \
style="color:rgb(192,192,192)">_____________________</span><br> <a \
href="http://www.davidrevoy.com" \
target="_blank">http://www.davidrevoy.com</a></font><br></div> <br><br><div \
class="gmail_quote"><div><div>On Mon, Mar 24, 2014 at 6:58 PM, Koushik S <span \
dir="ltr">&lt;<a href="mailto:skoushik333@gmail.com" \
target="_blank">skoushik333@gmail.com</a>&gt;</span> wrote:<br></div> \
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div><div> <div dir="ltr"><div><div>Hi,<br><br></div>    I \
was working on and off on this bug, and here are the developments on this so far. I \
have been able to create a separate area for the FG colour to be displayed. <br><br>  \
Here&#39;s what I&#39;ve come up with so far: <a \
href="http://i.imgur.com/UqyjdZl.png" \
target="_blank">http://i.imgur.com/UqyjdZl.png</a><br>




<br></div>    Any feedbacks are welcomed. <br></div><div \
class="gmail_extra"><div><div><br><br><div class="gmail_quote">On Sat, Mar 15, 2014 \
at 7:22 PM, Koushik S <span dir="ltr">&lt;<a href="mailto:skoushik333@gmail.com" \
target="_blank">skoushik333@gmail.com</a>&gt;</span> wrote:<br>




<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div><div class="gmail_extra"><br><div \
class="gmail_quote">On Sat, Mar 15, 2014 at 4:57 PM, Sven Langkamp <span \
dir="ltr">&lt;<a href="mailto:sven.langkamp@gmail.com" \
target="_blank">sven.langkamp@gmail.com</a>&gt;</span> wrote:<br>





<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex">It&#39;s hard to tell what you are trying to do. \
Can you attach the code and a screenshot?</blockquote>





</div><br></div></div><div class="gmail_extra">Sure. Here&#39;s the code snippet I \
added in the paintEvent.<br><br></div><div \
class="gmail_extra">&lt;code&gt;<br>//painting foreground color<br>    QPainterPath \
path2;<br>




    path2.addEllipse(QPoint(180,180), colorInnerRadius-25, colorInnerRadius - \
25);<br>  painter.fillPath(path2, m_triangleColorSelector-&gt;color());<br>    \
painter.drawPath(path2);<br></div><div \
class="gmail_extra">&lt;/code&gt;<br></div><div class="gmail_extra"><br \
clear="all"></div><div class="gmail_extra">





I&#39;ve also added in some modifications to the masks. The size of the masks and \
also the path are arbitrary and are just used for testing. <br><br></div><div \
class="gmail_extra">&lt;code&gt;<br></div><div class="gmail_extra">





    int side = qMin(width()/2, height()/2);<br></div><div class="gmail_extra">    int \
side2 = qMin(width()/2, height()/2);<br>    QRegion maskedRegion (width()/2 - side/2, \
height()/2 - side/2, side, side, QRegion::Ellipse);<br>





    QRegion maskedRegion2 (180 - side2/2, 180 - side2/2 , side2, side2, \
QRegion::Ellipse);<br>    setMask(maskedRegion + maskedRegion2);<br></div><div \
class="gmail_extra">&lt;/code&gt;<br></div><div class="gmail_extra"><br>





</div><div class="gmail_extra">These wouldn&#39;t work since, the QRect which houses \
only the popup palette. I couldn&#39;t figure out the part of the code which changes \
the QRect size. <br><br></div><div class="gmail_extra">





But, as I&#39;ve been going through it, changing the size in the sizeHint() method \
seems to change the overall size of the widget i.e., it enlarges it. So, I probably \
should change most of the code which calculates the relative positions of the \
favourite brushes and so on. Is it the right way to do it? <br>




<span><font color="#888888">
</font></span></div><span><font color="#888888"><div class="gmail_extra"><br>-- \
<br><div dir="ltr"><div>regards,</div>Koushik. S</div> </div></font></span></div>
</blockquote></div><br><br clear="all"><br></div></div><span><font color="#888888">-- \
<br><div dir="ltr"><div>regards,</div>Koushik. S</div> </font></span></div>
<br></div></div><div>_______________________________________________<br>
Krita 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></div></blockquote></div><br></div> \
<br>_______________________________________________<br> Krita 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><br clear="all"><br></div></div><span><font \
color="#888888">-- <br><div dir="ltr"><div>regards,</div>Koushik. S</div> \
</font></span></div> <br>_______________________________________________<br>
Krita 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></div> \
</div></div><br>_______________________________________________<br> Krita mailing \
list<br> <a href="mailto:kimageshop@kde.org">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><br clear="all"><br>-- <br><div \
dir="ltr"><div>regards,</div>Koushik. S</div> </div>



_______________________________________________
Krita 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