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

List:       kde-core-devel
Subject:    Re: QPushButton problem with KDE styles
From:       mosfet <mosfet () mandrakesoft ! com>
Date:       2001-03-20 22:59:51
[Download RAW message or body]

Works fine, that is what makes the text "sunken down" when you press a
button.

Martijn Klingens wrote:
> 
> On Tuesday 20 March 2001 21:32, Matthias Ettrich wrote:
> > Thanks for bringing that up. The solution is simple: change the
> > drawPushButton button functions in the KDE styles according to what the Qt
> > styles do (have a look at qwindowsstyle.cpp, for example).
> 
> I now have a preliminary version working for the Highcolor style. I have one
> question and one remark though.
> 
> The question: can I make the margin between the button border and the pixmap
> any arbitrary size that looks best for the given style, or should I stick
> with the 4-pixel margin that the Qt styles use (at least those that I looked
> at)? Especially for the Highcolor style more than 4 pixels looks nicer, but
> I'm not sure whether that has side effects on size hints and such.
> 
> And the remark: I don't know who wrote the original Highcolor version, but
> there was a bug in the code. The code  'x1 + act ? 1 : 0' is evaluated as
> '(x1 + act) ? 1 : 0' and not as the (in this case expected and required) 'x1
> + (act ? 1 : 0)'. I hope this actually was a typo and in the original code
> the end result was the same, so nobody noticed until now. Nevertheless, I
> think it doesn't hurt to mention this (potential) pitfall with the C++
> operator precedence order here.
> 
> I'm not advocating my own coding style here as I tend to use too much
> brackets (just to make sure and too lazy to test if they're really needed),
> but too less as in this case isn't good either. Also, please don't take this
> as a flame, but learn from this experience as much as I (hopefully) do from
> my own mistakes.
> 
> Regards,
> 
> Martijn

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

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