Commit Graph

28 Commits

Author SHA1 Message Date
Alfred 1b3b621957 add tooltips to IconOnly tabs 2021-10-25 16:21:14 +02:00
John Maguire 341dc7326f Reformat all C++ 2020-09-22 14:56:06 +01:00
Jonas Kvinge 344023e6dd Fix formatting 2019-11-10 15:16:39 +01:00
Jonas Kvinge ba31c755ef Replace all uses of QSignalMapper with C++11 lambda expressions 2019-11-10 15:07:12 +01:00
Antonio Russo c5c294ba14 fancytabwidget.cpp: reuse QSettings object
avoid excessive locking by reusing a common QSettings object in
loadSettings.
2019-09-10 18:41:18 -06:00
Antonio Russo e2de5cd62e fancytabwidget.cpp: prefer QString to std::string
Consistently use QString, rather than creating a std::string and
immediately casting to std::string
2019-09-10 18:41:18 -06:00
Antonio Russo e66fdd86da Periodically save settings
Instead of immediately saving, which leads to poor performance,
and possible hardware damage (see #6057), limit saves to once
per second (similar to how KDE does it).  It also guarantees
that only one save is required per second, by sharing a QSettings
object, and establishes a signaling framework to put other
setting save events into (but only uses this for the two major
offenders: playlist tab switching and window resizing).

This is in contrast to 6a312e7, which simply deferred the save
until program exit, and caused problems for some people (see #6217
and #6209).

Signed-off-by: Antonio Russo <antonio.e.russo@gmail.com>
2019-09-10 18:41:18 -06:00
Jonas Kvinge d4fab4a2ea Merge remote-tracking branch 'upstream/master' into qt5-update 2018-11-11 22:46:07 +01:00
Jonas Kvinge 0104763009 Fix missing signal (#6195)
* Fix missing signal

* Fix formatting
2018-11-11 16:48:09 +00:00
Chocobozzz 70f68b1926
Merge remote-tracking branch 'upstream/master' into qt5 2018-02-01 09:50:42 +01:00
Vikram Ambrose 790fc2ff28 Replace Nokia based FancyTabWidget with standard QTabWidget (#5956)
* Replace Nokia sidebar widget with QTabWidget

The old sidebar widget was written by Nokia 10 years ago
and was a hand made hardcoded mess of widgets trying to
emulate a QTabWidget.

This commit completely replaces it with a widget of the
same name (FancyTabWidget) but is a much simpler subclass
of the standard QTabWidget allowing for a 50% code reduction.

There is still some manual draw code copied over to get the
exact same look of the previous widget but this is not strictly
necessary and can be later refactored with simpler drawControl
code based on styling preferences.

Benefits:
 - 50% code reduction
 - Easier to understand standard QTabWidget mechanics
 - Built-in support for re-arranging and closing tabs

* Save and restore sidebar tab order

Allow the user to rearrange the tab order by dragging
tabs to a new location. Tab order is saved on exit and restored
on start

* Fix some code formatting issues
2018-01-10 09:22:05 +00:00
Chocobozzz e6e189967d Merge remote-tracking branch 'upstream/master' into qt5 2016-02-29 18:03:02 +01:00
Arun Narayanankutty b4fe7ac7e2 move duplicated code to annonymous namespace static function
update
2016-02-11 05:45:08 -06:00
Chocobozzz 8b226c2171 Update non optionnals sources to qt5 2015-04-11 23:24:07 +02:00
John Maguire 3323c2d094 Convert all instances of foreach() to a C++11 for
find ext src -name '*.cpp' -exec \
    sed -i -e 's/foreach(\([^,]\+\),/for (\1 :/' {} \;
2014-02-10 14:43:32 +01:00
John Maguire bebd781fdf Reformat all non-3rd-party C/C++/Objective-C++.
Command line:
find src ext -regex '.*\.\(h\|cpp\|mm\)' -exec clang-format -i
 -style='{BasedOnStyle: Google, DerivePointerBinding: false}' {} \;
2014-02-07 16:34:20 +01:00
John Maguire 71893e4847 Use nullptr instead of NULL everywhere. 2014-02-06 17:29:59 +01:00
Arnaud Bienner bc5aa4055c Show a tooltip for sidebar tabs: only when needed for large side bar, always in the other cases, as I guess text will be elided most of the time.
Update issue 1202
This work around this issue a bit.
2013-04-01 17:54:33 +02:00
Arnaud Bienner 2081c30893 Revert "Show tooltips in the sidebar only in Tabs and IconsOnly modes"
This reverts commit 2dd2b615ef.
2013-04-01 16:48:21 +02:00
David Sansome 351a49e2b4 Elide the fancy sidebar text on the right instead of in the middle. Fixes issue 3335. 2012-12-25 13:10:10 +11:00
David Sansome f16fc8867e Allow podcasts to be added through the normal SongLoader mechanism (dragging to the playlist, on the commandline, "Add Stream", etc.) 2012-03-11 17:57:15 +00:00
Andrea Decorte 2dd2b615ef Show tooltips in the sidebar only in Tabs and IconsOnly modes 2011-05-03 18:06:17 +00:00
David Sansome 3eedc916ad Add a new logging system 2011-04-22 16:50:29 +00:00
Andrea Decorte d29aa81a3b disable double middle click in playlist tabbar and activate elide mode
in sidebar
2011-04-02 17:28:43 +00:00
David Sansome bb186feda1 Show scroll buttons on the sidebar when it's bigger than the window. Fixes issue #1061 2010-12-11 12:01:19 +00:00
David Sansome d761a5e91f Add a "plain sidebar" option. Fixes issue #1031 2010-12-07 21:04:52 +00:00
David Sansome ba520b3793 Elide the text on the sidebar if it's too long. Fix tab animations when the tabs have non-ascii characters. Fixes issue #987 2010-12-04 18:03:53 +00:00
David Sansome 48da2f996f Move the fancy tab widget into src/widgets, remove more dead code, add it to debian copyrights. 2010-10-10 14:04:05 +00:00