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
4016a1a0
Commit
4016a1a0
authored
Aug 25, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix flickering of panels in preferences
parent
a8b27f21
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
16 deletions
+23
-16
modules/gui/qt4/components/preferences.cpp
modules/gui/qt4/components/preferences.cpp
+6
-4
modules/gui/qt4/components/preferences.hpp
modules/gui/qt4/components/preferences.hpp
+3
-2
modules/gui/qt4/dialogs/prefs_dialog.cpp
modules/gui/qt4/dialogs/prefs_dialog.cpp
+14
-10
No files found.
modules/gui/qt4/components/preferences.cpp
View file @
4016a1a0
...
...
@@ -45,6 +45,7 @@
#include <QScrollArea>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QHeaderView>
#define ITEM_HEIGHT 25
...
...
@@ -62,6 +63,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
setColumnCount
(
1
);
setIconSize
(
QSize
(
ITEM_HEIGHT
,
ITEM_HEIGHT
)
);
setAlternatingRowColors
(
true
);
header
()
->
hide
();
#ifndef WIN32
// Fixme - A bit UGLY
...
...
@@ -320,7 +322,7 @@ PrefsPanel::PrefsPanel( QWidget *_parent ) : QWidget( _parent )
{}
PrefsPanel
::
PrefsPanel
(
intf_thread_t
*
_p_intf
,
QWidget
*
_parent
,
PrefsItemData
*
data
)
:
PrefsItemData
*
data
,
bool
currently_advanced
)
:
QWidget
(
_parent
),
p_intf
(
_p_intf
)
{
module_config_t
*
p_item
;
...
...
@@ -480,7 +482,7 @@ PrefsPanel::PrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
some_hidden_text
->
setWordWrap
(
true
);
setLayout
(
global_layout
);
setAdvanced
(
fals
e
);
setAdvanced
(
currently_advanced
,
tru
e
);
}
void
PrefsPanel
::
Apply
()
...
...
@@ -514,10 +516,10 @@ void PrefsPanel::Apply()
void
PrefsPanel
::
Clean
()
{}
void
PrefsPanel
::
setAdvanced
(
bool
adv
)
void
PrefsPanel
::
setAdvanced
(
bool
adv
,
bool
force
)
{
bool
some_hidden
=
false
;
if
(
adv
==
advanced
)
return
;
if
(
!
force
&&
adv
==
advanced
)
return
;
advanced
=
adv
;
QList
<
ConfigControl
*>::
Iterator
i
;
...
...
modules/gui/qt4/components/preferences.hpp
View file @
4016a1a0
...
...
@@ -78,7 +78,7 @@ class PrefsPanel : public QWidget
{
Q_OBJECT
public:
PrefsPanel
(
intf_thread_t
*
,
QWidget
*
,
PrefsItemData
*
);
PrefsPanel
(
intf_thread_t
*
,
QWidget
*
,
PrefsItemData
*
,
bool
);
PrefsPanel
(
QWidget
*
);
virtual
~
PrefsPanel
()
{};
void
Apply
();
...
...
@@ -90,7 +90,8 @@ private:
QVBoxLayout
*
global_layout
;
bool
advanced
;
public
slots
:
void
setAdvanced
(
bool
);
void
setAdvanced
(
bool
,
bool
);
void
setAdvanced
(
bool
a
)
{
return
setAdvanced
(
a
,
false
);
}
};
#endif
modules/gui/qt4/dialogs/prefs_dialog.cpp
View file @
4016a1a0
...
...
@@ -37,20 +37,20 @@ PrefsDialog *PrefsDialog::instance = NULL;
PrefsDialog
::
PrefsDialog
(
intf_thread_t
*
_p_intf
)
:
QVLCFrame
(
_p_intf
)
{
QGridLayout
*
main_layout
=
new
QGridLayout
();
QGridLayout
*
main_layout
=
new
QGridLayout
(
this
);
setWindowTitle
(
qtr
(
"Preferences"
)
);
resize
(
800
,
450
);
tree_panel
=
new
QWidget
;
tree_panel
=
new
QWidget
(
0
)
;
tree_panel_l
=
new
QHBoxLayout
;
tree_panel
->
setLayout
(
tree_panel_l
);
main_panel
=
new
QWidget
;
main_panel
=
new
QWidget
(
0
)
;
main_panel_l
=
new
QHBoxLayout
;
main_panel
->
setLayout
(
main_panel_l
);
// Choice for types
types
=
new
QGroupBox
(
"Show settings"
);
QHBoxLayout
*
tl
=
new
QHBoxLayout
();
QHBoxLayout
*
tl
=
new
QHBoxLayout
(
0
);
tl
->
setSpacing
(
3
);
tl
->
setMargin
(
3
);
small
=
new
QRadioButton
(
"Basic"
,
types
);
tl
->
addWidget
(
small
);
all
=
new
QRadioButton
(
"All"
,
types
);
tl
->
addWidget
(
all
);
...
...
@@ -64,11 +64,15 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
simple_panel
=
NULL
;
advanced_panel
=
NULL
;
main_layout
->
add
Layout
(
tl
,
0
,
0
,
1
,
1
);
main_layout
->
add
Widget
(
types
,
0
,
0
,
1
,
1
);
main_layout
->
addWidget
(
tree_panel
,
1
,
0
,
1
,
1
);
main_layout
->
addWidget
(
adv_chk
,
2
,
0
,
1
,
1
);
main_layout
->
addWidget
(
main_panel
,
0
,
1
,
3
,
1
);
main_layout
->
setColumnMinimumWidth
(
0
,
200
);
main_layout
->
setColumnStretch
(
0
,
1
);
main_layout
->
setColumnStretch
(
1
,
3
);
setAll
();
connect
(
adv_chk
,
SIGNAL
(
toggled
(
bool
)
),
...
...
@@ -95,7 +99,7 @@ void PrefsDialog::setAll()
if
(
!
advanced_tree
)
{
advanced_tree
=
new
PrefsTree
(
p_intf
,
t
his
);
advanced_tree
=
new
PrefsTree
(
p_intf
,
t
ree_panel
);
connect
(
advanced_tree
,
SIGNAL
(
currentItemChanged
(
QTreeWidgetItem
*
,
QTreeWidgetItem
*
)
),
this
,
SLOT
(
changePanel
(
QTreeWidgetItem
*
)
)
);
...
...
@@ -109,10 +113,9 @@ void PrefsDialog::setAll()
simple_panel
->
hide
();
}
if
(
!
advanced_panel
)
advanced_panel
=
new
PrefsPanel
(
this
);
advanced_panel
=
new
PrefsPanel
(
main_panel
);
main_panel_l
->
addWidget
(
advanced_panel
);
advanced_panel
->
show
();
setAdvanced
(
adv_chk
->
isChecked
()
);
}
void
PrefsDialog
::
setSmall
()
...
...
@@ -153,7 +156,8 @@ void PrefsDialog::changePanel( QTreeWidgetItem *item )
}
if
(
!
data
->
panel
)
{
data
->
panel
=
new
PrefsPanel
(
p_intf
,
this
,
data
);
data
->
panel
=
new
PrefsPanel
(
p_intf
,
main_panel
,
data
,
adv_chk
->
isChecked
()
);
}
advanced_panel
=
data
->
panel
;
main_panel_l
->
addWidget
(
advanced_panel
);
...
...
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