Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new window decoration to MDISubWindows #2516

Merged
merged 2 commits into from May 3, 2016

Conversation

@BaraMGB
Copy link
Contributor

BaraMGB commented Jan 25, 2016

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

Greetings, Steffen

@nitronova
Copy link

nitronova commented Jan 26, 2016

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 BaraMGB:SubwindowDecoration branch from 3f51f01 to bb0018e Jan 27, 2016
@BaraMGB
Copy link
Contributor Author

BaraMGB commented Jan 27, 2016

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

@Umcaruje
Copy link
Member

Umcaruje commented Jan 27, 2016

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
@iansannar
Copy link
Contributor

iansannar commented Jan 27, 2016

That's gorgeous!
On Jan 27, 2016 6:26 AM, "Umcaruje" notifications@github.com wrote:

[image: screenshot from 2016-01-27 14 07 01]
https://cloud.githubusercontent.com/assets/6282045/12614537/db4a5352-c500-11e5-922d-e1782b0c74fd.png

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 https://github.com/LMMS/lmms/files/106637/icons.zip


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

@zonkmachine
Copy link
Member

zonkmachine commented Jan 27, 2016

👍

@RebeccaDeField
Copy link
Contributor

RebeccaDeField commented Jan 28, 2016

@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
Copy link
Member

tresf commented Jan 28, 2016

@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
Member

Umcaruje commented Jan 28, 2016

@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 BaraMGB:SubwindowDecoration branch from bb0018e to ac6e898 Jan 30, 2016
@BaraMGB
Copy link
Contributor Author

BaraMGB commented Jan 30, 2016

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

@IvanMaldonado
Copy link
Contributor

IvanMaldonado commented Feb 23, 2016

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
Contributor

RebeccaDeField commented Feb 23, 2016

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

dednikko commented Feb 23, 2016

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

dednikko commented Feb 23, 2016

*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
Contributor

RebeccaDeField commented Feb 24, 2016

titlebaridea
Out of focus

titlebaridea2
In focus

@dednikko
Copy link

dednikko commented Feb 24, 2016

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
Copy link
Contributor Author

BaraMGB commented Feb 24, 2016

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

@RebeccaDeField
Copy link
Contributor

RebeccaDeField commented Feb 24, 2016

@BaraMGB 👍

@BaraMGB BaraMGB force-pushed the BaraMGB:SubwindowDecoration branch from ac6e898 to 0f42b8e Feb 29, 2016
@Umcaruje Umcaruje mentioned this pull request Mar 3, 2016
16 of 16 tasks complete
@Umcaruje
Copy link
Member

Umcaruje commented Mar 6, 2016

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
Contributor

RebeccaDeField commented Mar 6, 2016

@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
Copy link
Contributor

claell commented Mar 7, 2016

@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
Contributor

RebeccaDeField commented Mar 15, 2016

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

@claell
Copy link
Contributor

claell commented Mar 15, 2016

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

@RebeccaDeField
Copy link
Contributor

RebeccaDeField commented Mar 30, 2016

@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
Copy link
Member

Umcaruje commented Apr 3, 2016

@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
Copy link
Contributor Author

BaraMGB commented May 2, 2016

Done

@Umcaruje
Copy link
Member

Umcaruje commented May 2, 2016

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 BaraMGB:SubwindowDecoration branch 2 times, most recently from faf4bdd to 77375c4 May 2, 2016
@BaraMGB
Copy link
Contributor Author

BaraMGB commented May 2, 2016

Has someone test this on Mac and Windows?

@Umcaruje
Copy link
Member

Umcaruje commented May 2, 2016

Has someone test this on Mac and Windows?

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

@Umcaruje
Copy link
Member

Umcaruje commented May 2, 2016

@Umcaruje
Copy link
Member

Umcaruje commented May 2, 2016

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

@tresf
Copy link
Member

tresf commented May 2, 2016

👍 @Umcaruje was this Qt4 or Qt5 being tested?

@Umcaruje
Copy link
Member

Umcaruje commented May 3, 2016

👍 @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
Contributor

midi-pascal commented May 3, 2016

@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
Copy link
Member

Umcaruje commented May 3, 2016

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 BaraMGB:SubwindowDecoration branch from 77375c4 to 7135787 May 3, 2016
@Umcaruje Umcaruje force-pushed the BaraMGB:SubwindowDecoration branch from 7135787 to 4fd8fce May 3, 2016
@tresf
Copy link
Member

tresf commented May 3, 2016

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
Copy link
Member

Umcaruje commented May 3, 2016

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
Copy link
Member

tresf commented May 3, 2016

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
Copy link
Member

tresf commented May 3, 2016

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

👍

@Umcaruje
Copy link
Member

Umcaruje commented May 3, 2016

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
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@BaraMGB
Copy link
Contributor Author

BaraMGB commented May 3, 2016

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

@RebeccaDeField
Copy link
Contributor

RebeccaDeField commented May 3, 2016

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
Contributor

IvanMaldonado commented May 3, 2016

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

@Umcaruje
Copy link
Member

Umcaruje commented May 3, 2016

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.

@BaraMGB BaraMGB deleted the BaraMGB:SubwindowDecoration branch May 28, 2016
@tresf tresf mentioned this pull request Dec 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

You can’t perform that action at this time.