-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Conversation
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.
…e caption 'space.
PR looks great. We'll merge this once discussion over at #2528 is done. |
Damned, thought I had fixed this problem |
'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 |
The only Travis check failing is QT5 with the following error... Qt4 on all other platforms is succeeding.
|
…ey can now show more meaningfull information then simply the tab's name. 2) Fixed the compilation problem with QT5
…o, I've reverted the changes I made in commit 64efd68 (issue 2519).
…es gdb crash with SIGFPE.
src/gui/widgets/TabWidget.cpp
Outdated
@@ -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 ) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in commit 37d9d36
…flat design. Cyrille
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. |
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. |
src/gui/widgets/TabWidget.cpp
Outdated
|
||
setAutoFillBackground( true ); | ||
QColor bg_color = QApplication::palette().color( QPalette::Active, |
There was a problem hiding this comment.
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).
@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. |
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>"EFFETS" (previous translation) is too long for the limited available width. "FX" should be understable by all</translatorcomment> | ||
<translation>FX</translation> | ||
<translation>EFFETS</translation> | ||
</message> | ||
<message> | ||
<source>MIDI</source> |
There was a problem hiding this comment.
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?
src/gui/widgets/TabWidget.cpp
Outdated
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) |
There was a problem hiding this comment.
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
src/gui/widgets/GroupBox.cpp
Outdated
@@ -99,35 +99,18 @@ void GroupBox::updatePixmap() | |||
QColor bg_color = QApplication::palette().color( QPalette::Active, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
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.
Sorry for late to the party
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 |
@StCyr are you still available to work on this issue? |
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 :-( |
@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 :) |
Well, this PR has officially gone stale |
If I have time, I might revive this Pull Request |
Ok so I can't push to this branch, guess I'll need to make a new Pull request. |
Superseded by #3569 |
This PR relates to #2528
Br,
Cyrille