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
6e14c048
Commit
6e14c048
authored
Sep 07, 2010
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: be able to recompute the minimalWidth at anytime
Close #3774
parent
f2c03da6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+13
-2
modules/gui/qt4/main_interface.hpp
modules/gui/qt4/main_interface.hpp
+1
-0
No files found.
modules/gui/qt4/main_interface.cpp
View file @
6e14c048
...
@@ -252,8 +252,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
...
@@ -252,8 +252,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
/* Final sizing and showing */
/* Final sizing and showing */
setVisible
(
!
b_hideAfterCreation
);
setVisible
(
!
b_hideAfterCreation
);
setMinimumWidth
(
__MAX
(
controls
->
sizeHint
().
width
(),
computeMinimumSize
();
menuBar
()
->
sizeHint
().
width
()
)
+
30
);
/* Switch to minimal view if needed, must be called after the show() */
/* Switch to minimal view if needed, must be called after the show() */
if
(
b_minimalView
)
if
(
b_minimalView
)
...
@@ -318,6 +317,15 @@ MainInterface::~MainInterface()
...
@@ -318,6 +317,15 @@ MainInterface::~MainInterface()
p_intf
->
p_sys
->
p_mi
=
NULL
;
p_intf
->
p_sys
->
p_mi
=
NULL
;
}
}
void
MainInterface
::
computeMinimumSize
()
{
int
minWidth
=
30
;
if
(
menuBar
()
->
isVisible
()
)
minWidth
+=
__MAX
(
controls
->
sizeHint
().
width
(),
menuBar
()
->
sizeHint
().
width
()
);
setMinimumWidth
(
minWidth
);
}
/*****************************
/*****************************
* Main UI handling *
* Main UI handling *
*****************************/
*****************************/
...
@@ -813,7 +821,10 @@ void MainInterface::toggleMinimalView( bool b_minimal )
...
@@ -813,7 +821,10 @@ void MainInterface::toggleMinimalView( bool b_minimal )
}
}
b_minimalView
=
b_minimal
;
b_minimalView
=
b_minimal
;
if
(
!
b_videoFullScreen
)
if
(
!
b_videoFullScreen
)
{
setMinimalView
(
b_minimalView
);
setMinimalView
(
b_minimalView
);
computeMinimumSize
();
}
emit
minimalViewToggled
(
b_minimalView
);
emit
minimalViewToggled
(
b_minimalView
);
}
}
...
...
modules/gui/qt4/main_interface.hpp
View file @
6e14c048
...
@@ -120,6 +120,7 @@ private:
...
@@ -120,6 +120,7 @@ private:
/* */
/* */
void
setMinimalView
(
bool
);
void
setMinimalView
(
bool
);
void
setInterfaceFullScreen
(
bool
);
void
setInterfaceFullScreen
(
bool
);
void
computeMinimumSize
();
/* */
/* */
QSettings
*
settings
;
QSettings
*
settings
;
...
...
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