This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Window Decoration

Tags: None
(comma "," separated)
User avatar
alake
Registered Member
Posts
591
Karma
3
OS

Window Decoration

Wed Apr 02, 2014 4:36 pm
So I wanted to start a thread on the window decoration so I could share progress and get feedback on the design and implementation.

After several iterations the current design I'm targeting is:

The window on the left would be the default size of the close button (I know it doesn't show the app icon, so just imagine it there).

I've started implementing a QML version of the windec and in its current very preliminary (read buggy) state it looks like this:

That's running live in a Plasma 2 workspace. With the background gradient turned off on the Oxygen widget style, I don't think looks terribly out of place.
Anyway, for the code I started with Plastik QML windec code that Martin G pointed me to. You can track the latest code in my scratch git repo here:
http://quickgit.kde.org/?p=scratch%2Fal ... windec.git
I'm using project neon5 daily for a dev environment. (which is a few weeks old now, but it's enough to get me going)

What I still have to do is
# Get all the different windec button icons done
# Get the window shadows done. Does the Plasma 2 kwin have a independent window shadow effect? I forget.
# Get the close button size config done.
# Get the window tabs design and implementation done.

I will update the old svg Aurorae deco soon so we can have something to look at in Plasma 1, but there are some hard limitations there if the button order is different.

Hope this helps!
User avatar
jensreuterberg
Registered Member
Posts
598
Karma
3
OS

Re: Window Decoration

Wed Apr 02, 2014 5:33 pm
Ok awesome! I will release a changed Aurorae theme as soon as you're done (Thomas pointed me to the fact that there was a fix presented in the Open forums for the bugs in Aurorae (renaming the RC file) so that will be fixed too). Almost done making SVG mockup toolkit into a PNG mockup toolkit as well.

What are the benefits of Plastik vs Aurorae? I mean technically is there anything that one can do and the other can't? (In my world Aurorae can do shadows, Plastik can't - but that may just be me)

I know Marco Martin started working on a dark theme, should we check into changing the Aurorae theme into a dark version as well?


KDE Visual Design Group - "Sexy by default - Powerful through cooperation"
User avatar
alake
Registered Member
Posts
591
Karma
3
OS

Re: Window Decoration

Wed Apr 02, 2014 5:51 pm
jensreuterberg wrote:What are the benefits of Plastik vs Aurorae? I mean technically is there anything that one can do and the other can't? (In my world Aurorae can do shadows, Plastik can't - but that may just be me)


I may have confused things a bit. Let me try to clear things up. :-)

Aurorae in Plasma 1 kwin used svgs for theming. That version of Aurorae is no longer supported in Plasma 2 kwin. In Plasma 2 kwin, the new Aurorae is QML based. It is much more powerful than the old svg-based Aurorae in Plasma 1. As far as I can tell the new QML-based Aurorae should handle shadows just fine (just haven't done it yet). Plastik is just an example QML windec theme Martin G included that mimics the Plastik window decoration of old. I copied that example code and used it as the starting point for the new windec theme. My question regarding shadows has more to do with the general approach to shadows in Plasma 2 kwin. I wasn't sure if the longer term intent was to handle shadows centrally as a window effect plugin or if the expectation is to have the windec theme handle it as it does today.

I know Marco Martin started working on a dark theme, should we check into changing the Aurorae theme into a dark version as well?

No need, since the QML windec will follow the system color scheme. All that's required there, just like for the widget style, is to change the system color theme. So what we really need to a dark system color scheme (which plasma can also use to colorize the plasma theme - which is what Marco did).

Hope this helps!
User avatar
jensreuterberg
Registered Member
Posts
598
Karma
3
OS

Re: Window Decoration

Wed Apr 02, 2014 9:34 pm
Yup :)

I am a tad confused... Ok so QML it is from now on? Awesome. We need Nuno to hold the promised tutorial of QML for everyone as fast as possible.


KDE Visual Design Group - "Sexy by default - Powerful through cooperation"
User avatar
alake
Registered Member
Posts
591
Karma
3
OS

Re: Window Decoration

Thu Apr 03, 2014 6:01 pm
jensreuterberg wrote:Yup :)

I am a tad confused... Ok so QML it is from now on? Awesome. We need Nuno to hold the promised tutorial of QML for everyone as fast as possible.


Sorry for the confusion Jens. Yes QML going forward I think.

Till Nuno does the tutorial, if anyone is looking for a pretty well done intro to QML, Qt provides a good tutorial on their web page.
http://qt-project.org/doc/qt-5/qml-tutorial.html

Also I recommend installing the latest version of Qt Creator from your distro repos. It comes with some great QML examples you can play with. Here is a great QML tutorial from Qt on using Qt Creator to create a QML app:
http://qt-project.org/doc/qtcreator-3.0 ... ation.html

Just so it's clear, QML can use svg files as an image source, but it doesn't need the specific svg element ids and specific filenames that the old svg-based Aurorae theme does. SInce it's QML we get all the benefits of being able to add logic, animations, etc. that the old svgs didn't. It gives us a really good basis for creating a beautiful, modern window decoration design that is honors the design vision.

Martin did say that when we eventually get to a point where we want to make it default, it might need to be converted to C++ for what I think are performance reasons. But by then the design will have been validated and the conversion to C++ would be primarily be a porting exercise not a design exercise. So no need to worry about that right now.
mgraesslin
KDE Developer
Posts
572
Karma
7
OS

Re: Window Decoration

Sat Apr 05, 2014 1:04 pm
Looks good. Small correction to a previous comment: Aurorae in 4.11 already supports QML and Aurorae in 5.0 still supports the SVG themes. But as said: QML is way more flexible for the themes (in fact the SVG theme format is implemented using QML).

But I need to point out: Aurorae is not a solution for a default deco. It can be a starting point for later on a proper implementation in C++ but we cannot make it default due to technical reasons which are unfortunately even unfixable (at least for the first release). If you are interested I can explain the technical reasons.

Given what I have seen so far in the screenshot it doesn't look overly complex to reimplement the theme using C++.
User avatar
colomar
Registered Member
Posts
947
Karma
2
OS

Re: Window Decoration

Sun Apr 06, 2014 3:08 pm
I really like that! I already kinda liked the one you did for the demo package, but this looks (yet) a lot better!

And I like the fact that both the window decoration and the Plasma theme can adapt to the system colors, which has two major benefits:
- It's way more flexible than just a bright and a dark theme (some color schemes use e.g. green as their base color)
- It ensures that everything always looks consistent without users having to manually switch windeco and Plasma theme when they change their color theme
So for me, this is definitely the way to go!
User avatar
alake
Registered Member
Posts
591
Karma
3
OS

Re: Window Decoration

Thu Apr 24, 2014 1:53 am
I just wanted to share that with the success of community design cycle in the public forums for the UI controls, I'm prepping to move this to the public forums as well. Hopefully it will go at least as well. I've got a little bit of prep work to do but the thread should be open soon.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot]