Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
4b5e7346
Commit
4b5e7346
authored
Aug 12, 2009
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to select the style of Qt in Simple preferences.
parent
93f25799
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
245 additions
and
224 deletions
+245
-224
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/components/simple_preferences.cpp
+27
-1
modules/gui/qt4/components/simple_preferences.hpp
modules/gui/qt4/components/simple_preferences.hpp
+2
-1
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.cpp
+6
-0
modules/gui/qt4/ui/sprefs_interface.ui
modules/gui/qt4/ui/sprefs_interface.ui
+210
-222
No files found.
modules/gui/qt4/components/simple_preferences.cpp
View file @
4b5e7346
...
...
@@ -40,6 +40,8 @@
#include <QVBoxLayout>
#include <QScrollArea>
#include <QStyleFactory>
#include <QSettings>
#include <QtAlgorithms>
#include <string>
...
...
@@ -482,7 +484,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
* Interface Panel *
*******************/
START_SPREFS_CAT
(
Interface
,
qtr
(
"Interface Settings"
)
);
ui
.
defaultLabel
->
setFont
(
italicFont
);
//
ui.defaultLabel->setFont( italicFont );
ui
.
skinsLabel
->
setText
(
qtr
(
"This is VLC's skinnable interface. You can download other skins at"
)
+
QString
(
" <a href=
\"
http://www.videolan.org/vlc/skins.php
\"
>VLC skins website</a>."
)
);
...
...
@@ -495,6 +497,13 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
ui
.
languageBox
->
hide
();
ui
.
assoBox
->
hide
();
#endif
ui
.
stylesCombo
->
addItems
(
QStyleFactory
::
keys
()
);
ui
.
stylesCombo
->
setCurrentIndex
(
ui
.
stylesCombo
->
findText
(
getSettings
()
->
value
(
"MainWindow/QtStyle"
,
""
).
toString
()
)
);
ui
.
stylesCombo
->
insertSeparator
(
1
);
CONNECT
(
ui
.
stylesCombo
,
currentIndexChanged
(
QString
),
this
,
changeStyle
(
QString
)
);
/* interface */
char
*
psz_intf
=
config_GetPsz
(
p_intf
,
"intf"
);
...
...
@@ -510,6 +519,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
optionWidgets
.
append
(
ui
.
skins
);
optionWidgets
.
append
(
ui
.
qt4
);
optionWidgets
.
append
(
ui
.
stylesCombo
);
ui
.
skins_zone
->
setEnabled
(
ui
.
skins
->
isChecked
()
);
CONNECT
(
ui
.
skins
,
toggled
(
bool
),
ui
.
skins_zone
,
setEnabled
(
bool
)
);
...
...
@@ -750,6 +760,9 @@ void SPrefsPanel::apply()
config_PutPsz
(
p_intf
,
"intf"
,
"skins2"
);
if
(
qobject_cast
<
QRadioButton
*>
(
optionWidgets
[
qtRB
])
->
isChecked
()
)
config_PutPsz
(
p_intf
,
"intf"
,
"qt"
);
getSettings
()
->
setValue
(
"MainWindow/QtStyle"
,
qobject_cast
<
QComboBox
*>
(
optionWidgets
[
styleCB
])
->
currentText
()
);
break
;
}
...
...
@@ -787,6 +800,19 @@ void SPrefsPanel::lastfm_Changed( int i_state )
config_RemoveIntf
(
VLC_OBJECT
(
p_intf
),
"audioscrobbler"
);
}
void
SPrefsPanel
::
changeStyle
(
QString
s_style
)
{
QApplication
::
setStyle
(
s_style
);
/* force refresh on all widgets */
QWidgetList
widgets
=
QApplication
::
allWidgets
();
QWidgetList
::
iterator
it
=
widgets
.
begin
();
while
(
it
!=
widgets
.
end
()
)
{
(
*
it
)
->
update
();
it
++
;
};
}
#ifdef WIN32
#include <QDialogButtonBox>
#include <QHeaderView>
...
...
modules/gui/qt4/components/simple_preferences.hpp
View file @
4b5e7346
...
...
@@ -78,7 +78,7 @@ enum {
spdifChB
,
};
enum
{
inputLE
,
cachingCoB
};
enum
{
skinRB
,
qtRB
};
enum
{
skinRB
,
qtRB
,
styleCB
};
class
ConfigControl
;
class
QComboBox
;
...
...
@@ -136,6 +136,7 @@ private slots:
void
assoDialog
();
void
saveAsso
();
#endif
void
changeStyle
(
QString
);
};
#endif
modules/gui/qt4/qt4.cpp
View file @
4b5e7346
...
...
@@ -451,6 +451,12 @@ static void *Thread( void *obj )
p_intf
->
p_sys
->
filepath
=
getSettings
()
->
value
(
"filedialog-path"
,
config_GetHomeDir
()
).
toString
();
/* Loads and tries to apply the preferred QStyle */
QString
s_style
=
getSettings
()
->
value
(
"MainWindow/QtStyle"
,
""
).
toString
();
if
(
s_style
.
compare
(
""
)
!=
0
)
QApplication
::
setStyle
(
s_style
);
/* Launch */
app
.
exec
();
...
...
modules/gui/qt4/ui/sprefs_interface.ui
View file @
4b5e7346
This diff is collapsed.
Click to expand it.
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