Skip to content

Add a new window decoration to MDISubWindows#2516

Merged
Umcaruje merged 2 commits into
LMMS:masterfrom
BaraMGB:SubwindowDecoration
May 3, 2016
Merged

Add a new window decoration to MDISubWindows#2516
Umcaruje merged 2 commits into
LMMS:masterfrom
BaraMGB:SubwindowDecoration

Conversation

@BaraMGB

@BaraMGB BaraMGB commented Jan 25, 2016

Copy link
Copy Markdown
Contributor

Okay, this is only a basis for a discussion. Reference to #2450

Greetings, Steffen

@programnoir

Copy link
Copy Markdown

I'll at least try to help dress it up nice and pretty with some suggestions by referring to the coding conventions. https://github.com/LMMS/lmms/wiki/Coding-conventions

*** please note that I am referring to your commit's new line numbers!

My suggestions for SubWindow.h:

  • Please swap lines 31 and 32 so that they are sorted by name. Thank you.
  • Please move line 29 so that it comes two lines after line 32. I noticed your intentions. Thank you.
  • This isn't your fault, but could you please put spaces around the = signs on line 44? Thank you.

And for SubWindow.cpp:

  • Please sort lines 29 through 34 by name and move line 35 to line 36. Thank you.
  • Forgive me if I'm mistaken, but if lines 53 and 56 are objects, please remove the space between the name of the objects and their respective opening parenthesis. Thank you.
  • From line 54 and onward, please add spaces after the commas in the parameters to make them more readable. Thank you.
  • Please break line 63 into two lines so that the length doesn't go beyond 80 characters. Thank you.
  • Lines 53 and 64 appear to be hard-coding colors. I understand that we're still working on CSS implementation. I'm listing it here as part of this to-do list for convenience sake.
  • Please add spaces around the -> in line 67, if possible. Thank you.
  • Please decrease the indentation of lines 70 through 75 and put spaces around = signs. Thank you.
  • This isn't your fault, but could you fix the spacing in line 102? Please remove the space between "if" and "(". Thank you.
  • Line 104 is having coding convention troubles, if you would please. Also not your fault. Thank you.

Hope this helps! Thank you.

@BaraMGB
BaraMGB force-pushed the SubwindowDecoration branch from 3f51f01 to bb0018e Compare January 27, 2016 00:00
@BaraMGB

BaraMGB commented Jan 27, 2016

Copy link
Copy Markdown
Contributor Author

Okay, I've changed the suggestions you gave. Thank you.

@Umcaruje

Copy link
Copy Markdown
Member

screenshot from 2016-01-27 14 07 01

I fiddled around with your code, and paired it up with a custom theme + color + icons, and it looks amazing!

Here's the stuff I changed:

  • I defined a new Qcolor called c, and used it to easily change the color:
QColor c("#2c974f");
QBrush brush(c);
  • I also set the pen to Qt::NoPen, so the windows are borderless. I also commented out lines 60, 61 and 62, since they were no longer needed.
  • I also changed the QRectF rect(0,0,width()-1,20); to QRectF rect(0,0,width(),20);, to work nicely with the borderless design.
  • Made new pixel perfect icons in inkscape.
    Get them: icons.zip

@rubiefawn

rubiefawn commented Jan 27, 2016

Copy link
Copy Markdown
Contributor

That's gorgeous!

@zonkmachine

Copy link
Copy Markdown
Contributor

👍

@RebeccaDeField

Copy link
Copy Markdown
Contributor

@Umcaruje I can't tell from the screenshot, but is there any variation of the shade when the title bar is active vs inactive? That might add some more usability.

@tresf

tresf commented Jan 28, 2016

Copy link
Copy Markdown
Member

@Umcaruje I can't tell from the screenshot, but is there any variation of the shade when the title bar is active vs inactive? That might add some more usability.

👍 Good catch.

@Umcaruje

Copy link
Copy Markdown
Member

@Umcaruje I can't tell from the screenshot, but is there any variation of the shade when the title bar is active vs inactive? That might add some more usability.

Nope, that needs to be implemented, and also buttons don't change on hover, but I think that'll be solved by CSS.

@BaraMGB
BaraMGB force-pushed the SubwindowDecoration branch from bb0018e to ac6e898 Compare January 30, 2016 20:37
@BaraMGB

BaraMGB commented Jan 30, 2016

Copy link
Copy Markdown
Contributor Author

Okay, I added some QPropertys which can be modified per style.css. Have a look.

@IvanMaldonado

Copy link
Copy Markdown
Contributor

Tested, it works for me

Manjaro 15.12 Capella
Kernel: x86_64 Linux 4.1.18-1-MANJARO

captura de pantalla_2016-02-22_20-27-30

@RebeccaDeField

Copy link
Copy Markdown
Contributor

Just made a mockup for title bars that I think would suit the current default theme well. Please take a look.

titlebaridea

@dednikko

Copy link
Copy Markdown

I like it. What will the difference be for the title bars that are IN focus
vs OUT of docs?

On Tue, Feb 23, 2016, 5:20 PM Rebecca DeField notifications@github.com
wrote:

Just made a mockup for title bars that I think would suit the current
default theme well. Please take a look.

[image: titlebaridea]
https://cloud.githubusercontent.com/assets/7960169/13270155/04748018-da41-11e5-9eaf-b878f227c6de.png


Reply to this email directly or view it on GitHub
#2516 (comment).

@dednikko

Copy link
Copy Markdown

*out of focus

On Tue, Feb 23, 2016, 5:45 PM Nikko Rocksalot nikko.rocksalot@gmail.com
wrote:

I like it. What will the difference be for the title bars that are IN
focus vs OUT of docs?

On Tue, Feb 23, 2016, 5:20 PM Rebecca DeField notifications@github.com
wrote:

Just made a mockup for title bars that I think would suit the current
default theme well. Please take a look.

[image: titlebaridea]
https://cloud.githubusercontent.com/assets/7960169/13270155/04748018-da41-11e5-9eaf-b878f227c6de.png


Reply to this email directly or view it on GitHub
#2516 (comment).

@RebeccaDeField

Copy link
Copy Markdown
Contributor

titlebaridea
Out of focus

titlebaridea2
In focus

@dednikko

Copy link
Copy Markdown

Looks clear to me! Thanks!

On Tue, Feb 23, 2016, 7:19 PM Rebecca DeField notifications@github.com
wrote:

[image: titlebaridea]
https://cloud.githubusercontent.com/assets/7960169/13272518/9369d2a4-da51-11e5-893f-0955b6521a39.png
Out of focus

[image: titlebaridea2]
https://cloud.githubusercontent.com/assets/7960169/13272519/936b13a8-da51-11e5-8e58-7b855a69ba5b.png
In focus


Reply to this email directly or view it on GitHub
#2516 (comment).

@BaraMGB

BaraMGB commented Feb 24, 2016

Copy link
Copy Markdown
Contributor Author

@RebeccaDeField you have a gradient in there, right? Okay, I add that property soon. And correct the typo @Umcaruje :-)

@RebeccaDeField

Copy link
Copy Markdown
Contributor

@BaraMGB 👍

@BaraMGB
BaraMGB force-pushed the SubwindowDecoration branch from ac6e898 to 0f42b8e Compare February 29, 2016 14:37
@Umcaruje Umcaruje mentioned this pull request Mar 3, 2016
16 tasks
@Umcaruje

Umcaruje commented Mar 6, 2016

Copy link
Copy Markdown
Member

I worked on this a bit and made a new branch on my fork:
master...Umcaruje:subwindow

I simplified the code a lot, so now we only have one rectrangle for the title, also implemented @RebeccaDeField's color idea. I have yet to fix the titles and the buttons.

Screenshot:
screenshot from 2016-03-04 01 11 27

Review and ideas welcome. I'll post around the challenges of proper title rendering and buttons a bit later.

@Umcaruje Umcaruje mentioned this pull request Mar 6, 2016
@RebeccaDeField

Copy link
Copy Markdown
Contributor

@Umcaruje Great work! 👍

My 2 cents: this may be because you have zoomed-in your screenshot, but I feel that the rounded corners are a bit jagged. Is there anything we can do to smooth the corners out a bit? If not, it might be best to keep the corners pointed/straight.

@claell

claell commented Mar 7, 2016

Copy link
Copy Markdown
Contributor

@RebeccaDeField I noticed the same regarding the corners. I don't know, what looks best, round or pointed, but I think even pointed ones should be at least rounded a bit.

@RebeccaDeField

Copy link
Copy Markdown
Contributor

@claell Perhaps a 2px radius will look better than 3px.

@claell

claell commented Mar 15, 2016

Copy link
Copy Markdown
Contributor

Maybe, I don't know. Cannot imagine what would look better, but I guess it would be worth a try.

@RebeccaDeField

Copy link
Copy Markdown
Contributor

@Umcaruje Could you try a 2px radius on the corners? If it still doesn't look enough smooth, I think we should go with straight corners.

@Umcaruje

Umcaruje commented Apr 3, 2016

Copy link
Copy Markdown
Member

@RebeccaDeField are you talking about the bottom or upper corners? Since this is a hack, and we're drawing over the actual window, my control of this is very limited. I'm actually drawing non-rounded rectrangles and lines with the code.

@BaraMGB

BaraMGB commented May 2, 2016

Copy link
Copy Markdown
Contributor Author

Okay, I have to look how this works.

@Umcaruje

Umcaruje commented May 2, 2016

Copy link
Copy Markdown
Member

@BaraMGB

BaraMGB commented May 2, 2016

Copy link
Copy Markdown
Contributor Author

Done

@Umcaruje

Umcaruje commented May 2, 2016

Copy link
Copy Markdown
Member

Ok, done. I've fixed the identation and rephrased some of the comments to make them clearer. I'll leave open for 24 hours, if someone else has any more input, and afterwards, I'm merging 🎉

@Umcaruje
Umcaruje force-pushed the SubwindowDecoration branch 2 times, most recently from faf4bdd to 77375c4 Compare May 2, 2016 15:28
@BaraMGB

BaraMGB commented May 2, 2016

Copy link
Copy Markdown
Contributor Author

Has someone test this on Mac and Windows?

@Umcaruje

Umcaruje commented May 2, 2016

Copy link
Copy Markdown
Member

Has someone test this on Mac and Windows?

Nope. @tresf could you test this on a mac?

@Umcaruje

Umcaruje commented May 2, 2016

Copy link
Copy Markdown
Member

@Umcaruje

Umcaruje commented May 2, 2016

Copy link
Copy Markdown
Member

A friend of mine tested it on windows 7, all looks well:
image

@tresf

tresf commented May 2, 2016

Copy link
Copy Markdown
Member

👍 @Umcaruje was this Qt4 or Qt5 being tested?

@Umcaruje

Umcaruje commented May 3, 2016

Copy link
Copy Markdown
Member

👍 @Umcaruje was this Qt4 or Qt5 being tested?

Qt4, when I tried to install the qt5 packages, my VM couldn't find them in the trusty ppa.

@midi-pascal

Copy link
Copy Markdown
Contributor

@Umcaruje You can easily install Qt5 from the Qt site (This is what I did to have both).
Qt5 can be installed alongside with Qt4 with no interference.
My 2 cents 😉

@Umcaruje

Umcaruje commented May 3, 2016

Copy link
Copy Markdown
Member

You can easily install Qt5 from the Qt site (This is what I did to have both).

Yes, I know, but this is for windows builds, which use a specific custom mingw PPA

@Umcaruje
Umcaruje force-pushed the SubwindowDecoration branch from 77375c4 to 7135787 Compare May 3, 2016 12:24
@Umcaruje
Umcaruje force-pushed the SubwindowDecoration branch from 7135787 to 4fd8fce Compare May 3, 2016 12:25
@tresf

tresf commented May 3, 2016

Copy link
Copy Markdown
Member

If you have dated PPAs...

sudo add-apt-repository ppa:tobydox/mingw-x-trusty
sudo apt-get update
sudo apt-get install mingw32-qt5-base mingw64-qt5-base

@Umcaruje

Umcaruje commented May 3, 2016

Copy link
Copy Markdown
Member

um, after some research, the correct packages are called mingw32-x-qt5base and mingw64-x-qt5base

I'll update the tutorial on wiki.

Edit: the current way of making qt5 executables is also wrong. You can call qt5 building by doing

../cmake/build_mingw64.sh -qt5

or

../cmake/build_mingw32.sh -qt5

I'll update this as well.

@tresf

tresf commented May 3, 2016

Copy link
Copy Markdown
Member

Edit: the current way of making qt5 executables is also wrong. You can call qt5 building by doing

Not, it is not wrong. That's just a helper to set the QT5 export.

@tresf

tresf commented May 3, 2016

Copy link
Copy Markdown
Member

The correct packages are called mingw32-x-qt5base and mingw64-x-qt5base

👍

@Umcaruje

Umcaruje commented May 3, 2016

Copy link
Copy Markdown
Member

Ok, its been over 24 hours, this has been tested on both linux and windows, and this PR has been open for enough time for devs to make remarks. That said, the travis builds also passed, so I'm merging this.
🎉 🎉 🎉 🎉 🎉

@Umcaruje
Umcaruje merged commit 0c9bf9b into LMMS:master May 3, 2016
@BaraMGB

BaraMGB commented May 3, 2016

Copy link
Copy Markdown
Contributor Author

Thanks to all! Especially to @Umcaruje for the great help. I hope this makes a lot of people happy. 🎉

@RebeccaDeField

RebeccaDeField commented May 3, 2016

Copy link
Copy Markdown
Contributor

Thank you to everyone who worked hard to make this a reality! I think I can speak on behalf on all of the themers when I say this feature really improves the interface :)

@IvanMaldonado

Copy link
Copy Markdown
Contributor

Been waiting for this like a kid for Christmas for so much time. Thank you!

@Umcaruje

Umcaruje commented May 3, 2016

Copy link
Copy Markdown
Member

Thanks on the kind words, but I really have to thank @BaraMGB for putting up with this PR, and @RebeccaDeField for providing the graphics. This is a prime example of teamwork and I'm very glad that we finally implemented this much wanted feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.