Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
eab76644
Commit
eab76644
authored
Nov 28, 2010
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: Allow disabling or resampling background art.
parent
c7ba2edb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
1 deletion
+25
-1
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.cpp
+8
-1
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/components/interface_widgets.hpp
+2
-0
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+5
-0
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.cpp
+10
-0
No files found.
modules/gui/qt4/components/interface_widgets.cpp
View file @
eab76644
...
...
@@ -188,7 +188,7 @@ void VideoWidget::release( void )
**********************************************************************/
BackgroundWidget
::
BackgroundWidget
(
intf_thread_t
*
_p_i
)
:
QWidget
(
NULL
),
p_intf
(
_p_i
),
b_expandPixmap
(
fals
e
)
:
QWidget
(
NULL
),
p_intf
(
_p_i
),
b_expandPixmap
(
false
),
b_withart
(
tru
e
)
{
/* A dark background */
setAutoFillBackground
(
true
);
...
...
@@ -222,6 +222,13 @@ void BackgroundWidget::updateArt( const QString& url )
void
BackgroundWidget
::
paintEvent
(
QPaintEvent
*
e
)
{
if
(
!
b_withart
)
{
/* we just want background autofill */
QWidget
::
paintEvent
(
e
);
return
;
}
int
i_maxwidth
,
i_maxheight
;
QPixmap
pixmap
=
QPixmap
(
pixmapUrl
);
QPainter
painter
(
this
);
...
...
modules/gui/qt4/components/interface_widgets.hpp
View file @
eab76644
...
...
@@ -87,9 +87,11 @@ class BackgroundWidget : public QWidget
public:
BackgroundWidget
(
intf_thread_t
*
);
void
setExpandstoHeight
(
bool
b_expand
)
{
b_expandPixmap
=
b_expand
;
}
void
setWithArt
(
bool
b_withart_
)
{
b_withart
=
b_withart_
;
};
private:
QString
pixmapUrl
;
bool
b_expandPixmap
;
bool
b_withart
;
virtual
void
contextMenuEvent
(
QContextMenuEvent
*
event
);
intf_thread_t
*
p_intf
;
protected:
...
...
modules/gui/qt4/main_interface.cpp
View file @
eab76644
...
...
@@ -373,6 +373,11 @@ void MainInterface::createMainWidget( QSettings *settings )
/* Bg Cone */
bgWidget
=
new
BackgroundWidget
(
p_intf
);
stackCentralW
->
addWidget
(
bgWidget
);
if
(
!
var_InheritBool
(
p_intf
,
"qt-bgcone"
)
)
bgWidget
->
setWithArt
(
false
);
else
if
(
var_InheritBool
(
p_intf
,
"qt-bgcone-expands"
)
)
bgWidget
->
setExpandstoHeight
(
true
);
/* And video Outputs */
if
(
b_videoEmbedded
)
...
...
modules/gui/qt4/qt4.cpp
View file @
eab76644
...
...
@@ -165,6 +165,12 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
#define QT_MINIMAL_MODE_TEXT N_("Start in minimal view (without menus)" )
#define QT_BGCONE_TEXT N_( "Display background cone or art" )
#define QT_BGCONE_LONGTEXT N_( "Display background cone or current album art " \
"when not playing." \
"Can be disabled to prevent burning screen." )
#define QT_BGCONE_EXPANDS_TEXT N_( "Expanding background cone or art." )
#define QT_BGCONE_EXPANDS_LONGTEXT N_( "Background art fits window's size" )
/**********************************************************************/
vlc_module_begin
()
set_shortname
(
"Qt"
)
...
...
@@ -238,6 +244,10 @@ vlc_module_begin ()
QT_AUTOLOAD_EXTENSIONS_TEXT
,
QT_AUTOLOAD_EXTENSIONS_LONGTEXT
,
false
)
add_bool
(
"qt-bgcone"
,
true
,
QT_BGCONE_TEXT
,
QT_BGCONE_LONGTEXT
,
true
)
add_bool
(
"qt-bgcone-expands"
,
false
,
QT_BGCONE_EXPANDS_TEXT
,
QT_BGCONE_EXPANDS_LONGTEXT
,
true
)
add_obsolete_bool
(
"qt-blingbling"
)
/* Suppressed since 1.0.0 */
add_obsolete_integer
(
"qt-display-mode"
)
/* Suppressed since 1.1.0 */
...
...
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