Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
e472ee3c
Commit
e472ee3c
authored
Mar 28, 2010
by
Jakob Leben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: subclass QStackedWidget for custom minimumSizeHint()
parent
9078322b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+2
-6
modules/gui/qt4/util/customwidgets.hpp
modules/gui/qt4/util/customwidgets.hpp
+11
-0
No files found.
modules/gui/qt4/main_interface.cpp
View file @
e472ee3c
...
...
@@ -34,7 +34,7 @@
#include "actions_manager.hpp" // killInstance
#include "extensions_manager.hpp" // killInstance
#include "util/customwidgets.hpp" // qtEventToVLCKey
#include "util/customwidgets.hpp" // qtEventToVLCKey
, QVLCStackedWidget
#include "util/qt_dirs.hpp" // toNativeSeparators
#include "components/interface_widgets.hpp" // bgWidget, videoWidget
...
...
@@ -361,7 +361,7 @@ void MainInterface::createMainWidget( QSettings *settings )
mainLayout
->
setSpacing
(
0
);
mainLayout
->
setMargin
(
0
);
/* */
stackCentralW
=
new
QStackedWidget
(
main
);
stackCentralW
=
new
Q
VLC
StackedWidget
(
main
);
/* Bg Cone */
bgWidget
=
new
BackgroundWidget
(
p_intf
);
...
...
@@ -690,15 +690,11 @@ void MainInterface::togglePlaylist()
/* Playlist is not visible, show it */
if
(
stackCentralW
->
currentWidget
()
!=
playlistWidget
)
{
playlistWidget
->
forceShow
();
showTab
(
playlistWidget
);
}
else
/* Hide it! */
{
restoreStackOldWidget
();
stackCentralW
->
updateGeometry
();
// HACK: So it doesn't limit the stackWidget minimumSize
playlistWidget
->
forceHide
();
}
playlistVisible
=
(
stackCentralW
->
currentWidget
()
==
playlistWidget
);
}
...
...
modules/gui/qt4/util/customwidgets.hpp
View file @
e472ee3c
...
...
@@ -30,6 +30,7 @@
#include <QLineEdit>
#include <QPushButton>
#include <QLabel>
#include <QStackedWidget>
/**
This class provides a QLineEdit which contains a greyed-out hinting
...
...
@@ -103,6 +104,16 @@ private:
Qt
::
TextElideMode
elideMode
;
};
class
QVLCStackedWidget
:
public
QStackedWidget
{
public:
QVLCStackedWidget
(
QWidget
*
parent
)
:
QStackedWidget
(
parent
)
{
}
QSize
minimumSizeHint
()
const
{
return
currentWidget
()
?
currentWidget
()
->
minimumSizeHint
()
:
QSize
();
}
};
/* VLC Key/Wheel hotkeys interactions */
class
QKeyEvent
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment