<div class="gmail_quote">On Sat, May 26, 2012 at 4:09 AM, Mark <span dir="ltr"><<a href="mailto:markg85@gmail.com" target="_blank">markg85@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p><br>
Op 26 mei 2012 03:08 schreef "Mark" <<a href="mailto:markg85@gmail.com" target="_blank">markg85@gmail.com</a>> het volgende:</p><div><div class="h5"><br>
><br>
> Hi,<br>
><br>
> While trying to fix some blur issues on tooltips i found myself digging deeper in ... other issues.<br>
><br>
> For starters, there is no tooltip consistency!<br>
> - Dolphin uses it's own tooltip classes.<br>
> - System Settings uses it's own tooltip classes.<br>
> - The plasma panels use the Plasma::ToolTipManager class - like it should be!<br>
><br>
> That's only for the consistency using classes! The style also differs and only the last one has blur behind it [1].<br>
><br>
> For dolphin i can understand the reason to have it's own tooltip class because it wants to fetch the tooltip data in a separate process in order to prevent a crash in the tooltip from crashing dolphin.<br>
><br>
> To get this in a workable situation where anyone can use the tooltips as they seem right we probably have to make a new ToolTipManager altogether. The current one is _way_ to much tailored at tooltips for the tasks plasmoid and doesn't leave much room for customization (correct me if i'm wrong). I would like to suggest a ToolTipManager with styles! Not themes! I repeat, not themes! Just style as in which data is being displayed where. The plasma theme is still the one to be for the theme so nothing changes there. What i think that should be possible is defining a ToolTip Theme. Or i actually think it's required if the plasma tooltip stuff is to be used in places where the tooltip can look completely different (again, like dolphin).<br>
><br>
> For example (in ascii art).<br>
> ToolTipTheme - Dolphin<br>
><br>
> |-------| test...<br>
> |ICON| ------------------------<br>
> |-------| test...<br>
> text...<br>
><br>
> ToolTipTheme - TasksAppLauncher<br>
><br>
> |-------| APP NAME<br>
> |ICON| APP DESCRIPTION<br>
> |-------| <br>
><br>
> ToolTipTheme - TasksPopup<br>
><br>
> |--------------------------| <br>
> |--------------------------| <br>
> |--------------------------| <br>
> |--------------------------| <br>
> |--------------------------| <br>
> |--------------------------| <br>
> |-------|<br>
> |ICON| APP DESCRIPTION<br>
> |-------|<br>
><br>
> That should make the intention clear even though the ascii art sucks ;)<br>
><br>
> I would say that we need an abstract theme class:<br>
><br>
> class ToolTipThemeAbstract<br>
> {<br>
> virtual QGraphisWidget* getTheme() = 0;<br>
> }<br>
><br>
> and some classes that implement it:<br>
> class ToolTipThemeDolphin : public ToolTipThemeAbstract<br>
> {<br>
> QGraphisWidget* getTheme();<br>
> }<br>
><br>
> In this case the theme for Task popups would do the rendering of the preview and window stuff.<br>
><br>
> The ToolTipManager call would remain the same only the values would be different.<br>
> Plasma::ToolTipManager::self()->setContent(QGraphicsWidget, ToolTipThemeAbstract);<br>
> The ToolTipManager would simply render the theme (getTheme()). I'm not quite sure yet if the data can just be put directly in the theme or if the theme and data should be separated.<br>
><br>
> Also, some themes should probably be provided by default. For example the TasksAppLauncher theme like in the ascii art above seems like a quite common fancy tooltip. Other themes like the dolphin one should just be an "in house" theme in the dolphin codebase. Others might like it, but it's certainly not a default theme that needs to be provided or something.<br>
><br>
> I think this would cleanup the ToolTip mess quite a bit and make it very flexible for everyone to use.<br>
><br>
> I will try and make a proof of concept for this in the coming days. Don't count on anything though - just to prevent high hopes.<br>
> If this works out and is going to be used for KDE then i would like to deprecate the current ToolTip and friend classes, delete them in frameworks and replace everything by this proposed tooltip structure.<br>
><br>
> Please do let me know what your thoughts are about this one!<br>
><br>
> Cheers,<br>
> Mark<br>
><br>
> [1] Right now i'm fixing the blur issue for Dolphin and System Settings. Those patches will appear on reviewboard somewhere tomorrow.</div></div><p></p>
<p>Lol, "no theme" then I write "theme" about everywhere.. I obviously meant "style"! Though "template" might fit the meaning better.</p>
<p>Sorry,<br>
Mark</p>
</blockquote></div>Patches for:<div>Dolphin: <a href="https://git.reviewboard.kde.org/r/105061/">https://git.reviewboard.kde.org/r/105061/</a></div><div>System Settings: <a href="https://git.reviewboard.kde.org/r/105060/">https://git.reviewboard.kde.org/r/105060/</a></div>
<div><br></div><div>I'd like to push them to master before the 4.9 branch happens. Why? because i see this as - long standing - bugs being fixed.</div><div>Also, this fixes the current situation that the most common tooltips are at least consistent in blurring.. It's obviously a temporary fix. The real fix would require a lot more work as you can read in my first post in this thread.</div>
<div><br></div><div>Cheers,</div><div>Mark</div>