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

Allow WidgetTab to use artwork tabs #2599

Closed
wants to merge 37 commits into from
Closed

Allow WidgetTab to use artwork tabs #2599

wants to merge 37 commits into from

Conversation

StCyr
Copy link

@StCyr StCyr commented Feb 22, 2016

This PR relates to #2528

Br,

Cyrille

Cyrille Bollu and others added 9 commits February 12, 2016 15:58
This version can only display & manage artwork tabs, which breaks
the InstrumentSoundShapingView as it still uses text tabs.

I'm planing to improve this implementation to let these artwork tabs fall back
to text mode when no artwork is given. This would solve the problem of the
InstrumentSoundShapingView.
This version will draw an artwork tab when the TabWidget::addTab function is given
a pixmapName. Otherwise, when pixmapName is NULL, it will fall back drawing a text
tab.
Atm, tooltips are simply tabs' name.
@tresf
Copy link
Member

tresf commented Feb 22, 2016

PR looks great. We'll merge this once discussion over at #2528 is done.

@StCyr
Copy link
Author

StCyr commented Feb 22, 2016

Damned, thought I had fixed this problem

@StCyr
Copy link
Author

StCyr commented Feb 22, 2016

'Compiles without hicups here; Your build env is most probably more strict than mine.

There's most probably a problem there, bu I can't see it: The error is related with pointers and it's been a long time that I didn't write in C

@tresf
Copy link
Member

tresf commented Feb 22, 2016

The only Travis check failing is QT5 with the following error... Qt4 on all other platforms is succeeding.

[ 99%] Building CXX object src/CMakeFiles/lmmsobjs.dir/gui/widgets/TextFloat.cpp.o
/home/travis/build/LMMS/lmms/src/gui/widgets/TabWidget.cpp: In member function ‘virtual void TabWidget::mousePressEvent(QMouseEvent*)’:
/home/travis/build/LMMS/lmms/src/gui/widgets/TabWidget.cpp:177:37: error: taking address of temporary [-fpermissive]
make[2]: *** [src/CMakeFiles/lmmsobjs.dir/gui/widgets/TabWidget.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [src/CMakeFiles/lmmsobjs.dir/all] Error 2
make: *** [all] Error 2

@@ -61,21 +66,31 @@ TabWidget::~TabWidget()



void TabWidget::addTab( QWidget * _w, const QString & _name, int _idx )
void TabWidget::addTab( QWidget * _w, const QString & _name, const QString & _tooltip, const char *activePixmap, const char *inactivePixmap, int _idx )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function parameters are not prefixed with an underscore anymore, that's an old coding convention, so please change _tooltip to tooltip etc.

Copy link
Author

@StCyr StCyr Apr 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in commit 37d9d36

@StCyr
Copy link
Author

StCyr commented Apr 27, 2016

Here's a mockup with a first attempt to flatten the TabWidget:

untitled

@Umcaruje
Copy link
Member

This looks good.

Two remarks: the Filter background should be flattened too, so its all consistent now.

Could you please increase the Icon TabWidget height by 2 pixels? So the icons have 2 pixels of top and bottom padding. I think that would make it more pleasing for the eyes.

@RebeccaDeField
Copy link
Contributor

Thanks for all of the hard work @StCyr! I do agree that removing the transparency does not give the icons enough blending to look right.

Does the background change when you hover? That might be enough interaction for the user.


setAutoFillBackground( true );
QColor bg_color = QApplication::palette().color( QPalette::Active,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some formatting here that should be fixed (tabs versus spaces).

@tresf
Copy link
Member

tresf commented Jul 5, 2016

@StCyr if you have time to fix this up we can get it into the RC2 release. There are some considerations in both code and implementation in the comments. Once they're addressed, we'll merge.

@StCyr
Copy link
Author

StCyr commented Jul 15, 2016

Hi @tresf

I've adapted my code to respect you coding conventions; I believe it is ok now.

Do you see something else to do?

Please note that I'll be away for 2 weeks in Augustus.

</message>
<message>
<source>FX</source>
<translatorcomment>&quot;EFFETS&quot; (previous translation) is too long for the limited available width. &quot;FX&quot; should be understable by all</translatorcomment>
<translation>FX</translation>
<translation>EFFETS</translation>
</message>
<message>
<source>MIDI</source>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liushuyu will this commit cause problems with the translation service you're managing?

p.drawText( 5, 11, m_caption );
}

// Calculate the tabs' x (tabs are painted next to the caption)
int tab_x_offset = m_caption.isEmpty() ? 4 : 14 + fontMetrics().width( m_caption );
// Calculate the tabs' x (tabs are painted next to the caption)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tabs vs spaces issue here

@@ -99,35 +99,18 @@ void GroupBox::updatePixmap()
QColor bg_color = QApplication::palette().color( QPalette::Active,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please make this background color themeable too? p.background(); should do the trick again.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then, I guess I'll also have to make the outer rectangle's color themeable also?

Or, would "p.background().color().darker( 150 )" sufficient?

@tresf tresf mentioned this pull request Aug 29, 2016
Cyrille Bollu added 2 commits September 5, 2016 15:06
This reverts commit 5b162c0.

Conflicts:
	src/gui/widgets/TabWidget.cpp

Reason: Artwork's color themeability had the side-effect that it removed the artworks' alpha
channel, thus making them ugly.
@liushuyu
Copy link
Member

Sorry for late to the party

should we be translating twice? @liushuyu does this put unnecessary duplicates in our translation files or will this be consolidated?

No, since it is in the same context, I don't think it will be translated twice. Even this is the case, our translation hosting platform, Transifex, will handle that as well.

What I suggest here is to add translation comments or hints about the strings/context to inform the translators who are less familiar with coding. The comments (hints) can be added either using special code comments like //: (standard C++ style comments follow by a colon) or editing the translation template (in our case, that's our en.ts language file).

@Umcaruje
Copy link
Member

Umcaruje commented Dec 3, 2016

@StCyr are you still available to work on this issue?

@StCyr
Copy link
Author

StCyr commented Dec 4, 2016

Hi @Umcaruje

Yes, I can still spend a few hours on this issue... But, I must say I'm completly lost in regard with what's still expected from me :-(

@Umcaruje
Copy link
Member

Umcaruje commented Dec 16, 2016

@StCyr well, what I would first highly suggest is to actually rebase this pull request, as we have a new theme now. Plus we should work together to pick a look that fits on the new theme. @RebeccaDeField could probably help us on this regard.

Also you should adress this: https://github.com/LMMS/lmms/pull/2599/files#r75424006

And also, from what I saw, only one set of icons is used atm, so that could get cleaned up.

P.S. Sorry for the late responce, I've started college, so I've been kept pretty busy :)

@Umcaruje
Copy link
Member

Well, this PR has officially gone stale

@Umcaruje Umcaruje changed the base branch from master to stable-1.2 April 29, 2017 22:54
@Umcaruje
Copy link
Member

If I have time, I might revive this Pull Request

@Umcaruje
Copy link
Member

Ok so I can't push to this branch, guess I'll need to make a new Pull request.

@Umcaruje
Copy link
Member

Superseded by #3569

@Umcaruje Umcaruje closed this May 21, 2017
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.

8 participants