[Kde-games-devel] Review Request 110137: PopupItem QML component for KGamePopupItem

Albert Astals Cid aacid at kde.org
Wed Apr 24 21:36:21 UTC 2013



> On April 23, 2013, 10:12 p.m., Albert Astals Cid wrote:
> > declarativeimports/qml/PopupItem.qml, line 40
> > <http://git.reviewboard.kde.org/r/110137/diff/1/?file=140650#file140650line40>
> >
> >     Is this hardcoded to that color in the cpp too?
> 
> Viranch Mehta wrote:
>     this is the color of KStatefulBrush, I took the color specs by printing it in cpp.
> 
> Albert Astals Cid wrote:
>     But that's not correct, KStatefulBrush depends on the theme and lots of other stuff, you can't take the color and hardcode it.
> 
> Albert Astals Cid wrote:
>     Probably you'll need to export that color with a c++ plugin or work on getting a QML binding of KStatefulBrush in kdelibs...
> 
> Viranch Mehta wrote:
>     I know hardcoding is bad since its theme-dependent, just wrote this since I was blocked since long on KMines port due to this, only thing pending is this little popup to show "game paused".
>     
>     I'm thinking of implementing something for access to color themes in kdeclarative. guess it doesn't make sense to push this in its current state.

Problem is, it will work for you, but lots of other people out there with non default themes it will look ugly most probably. We don't want to port to QML and stuff to look worse so yeah try to get it into KDeclarative or for now we can just have it in libkdegames if you feel more confortable working over here and then talk to kdelibs people.


- Albert


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110137/#review31467
-----------------------------------------------------------


On April 23, 2013, 7:51 p.m., Viranch Mehta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110137/
> -----------------------------------------------------------
> 
> (Updated April 23, 2013, 7:51 p.m.)
> 
> 
> Review request for KDE Games.
> 
> 
> Description
> -------
> 
> Implements a QML component KgCore.PopupItem for KGamePopupItem widget. Most of the properties of KGamePopupItem are provided by PopupItem, except ability to set the background brush (can set background color instead), and ability to set a custom QPixmap as icon (can set KIcon's name instead and switch showing icon on/off instead).
> 
> Although one of the critical downside is it cannot set theme based background and text colors. Not sure how to overcome this. But at least we have the component for starting to use in ports.
> 
> 
> Diffs
> -----
> 
>   declarativeimports/qml/PopupItem.qml PRE-CREATION 
>   declarativeimports/qml/qmldir 79aae32 
> 
> Diff: http://git.reviewboard.kde.org/r/110137/diff/
> 
> 
> Testing
> -------
> 
> The KMines port (viranch/qtquick branch in kmines) uses this component (src/qml/main.qml) for showing "paused" message when game is paused/unpaused. works as expected except themed colors.
> 
> 
> Thanks,
> 
> Viranch Mehta
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20130424/7fa2276e/attachment-0001.html>


More information about the kde-games-devel mailing list