Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
9af87f11
Commit
9af87f11
authored
Feb 18, 2010
by
Jakob Leben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: remedy faulty locationBar layout
parent
cd22ae1d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
22 deletions
+13
-22
modules/gui/qt4/components/playlist/standardpanel.cpp
modules/gui/qt4/components/playlist/standardpanel.cpp
+12
-22
modules/gui/qt4/components/playlist/standardpanel.hpp
modules/gui/qt4/components/playlist/standardpanel.hpp
+1
-0
No files found.
modules/gui/qt4/components/playlist/standardpanel.cpp
View file @
9af87f11
...
...
@@ -521,24 +521,22 @@ void LocationBar::invoke( int i_id )
void
LocationBar
::
layOut
(
const
QSize
&
size
)
{
menuMore
->
clear
();
widths
.
clear
();
int
count
=
buttons
.
count
();
QList
<
int
>
widths
;
int
totalWidth
=
0
;
for
(
int
i
=
0
;
i
<
count
;
i
++
)
{
int
w
=
buttons
[
i
]
->
sizeHint
().
width
();
if
(
i
==
0
||
totalWidth
+
w
<=
size
.
width
()
)
{
totalWidth
+=
w
;
widths
.
append
(
w
);
}
widths
.
append
(
w
);
totalWidth
+=
w
;
if
(
totalWidth
>
size
.
width
()
)
break
;
}
int
x
=
0
;
int
shown
=
widths
.
count
();
if
(
shown
<
count
)
if
(
totalWidth
>
size
.
width
()
&&
count
>
1
)
{
QSize
sz
=
btnMore
->
sizeHint
();
btnMore
->
setGeometry
(
0
,
0
,
sz
.
width
(),
size
.
height
()
);
...
...
@@ -550,28 +548,20 @@ void LocationBar::layOut( const QSize& size )
{
btnMore
->
hide
();
}
shown
--
;
for
(
int
i
=
count
-
1
;
i
>=
0
;
i
--
)
{
if
(
i
>
shown
)
{
menuMore
->
addAction
(
actions
[
i
]
);
buttons
[
i
]
->
hide
();
}
else
if
(
i
>
0
&&
totalWidth
>
size
.
width
()
)
if
(
totalWidth
<=
size
.
width
()
||
i
==
0
)
{
menuMore
->
addAction
(
actions
[
i
]
);
buttons
[
i
]
->
hide
();
buttons
[
i
]
->
setGeometry
(
x
,
0
,
qMin
(
size
.
width
()
-
x
,
widths
[
i
]
),
size
.
height
()
);
buttons
[
i
]
->
show
();
x
+=
widths
[
i
];
totalWidth
-=
widths
[
i
];
}
else
{
buttons
[
i
]
->
setGeometry
(
x
,
0
,
qMin
(
widths
[
i
],
size
.
width
()
-
x
),
size
.
height
()
);
buttons
[
i
]
->
show
();
totalWidth
-=
widths
[
i
];
x
+=
widths
[
i
];
menuMore
->
addAction
(
actions
[
i
]
);
buttons
[
i
]
->
hide
();
if
(
i
<
shown
)
totalWidth
-=
widths
[
i
];
}
}
}
...
...
modules/gui/qt4/components/playlist/standardpanel.hpp
View file @
9af87f11
...
...
@@ -152,6 +152,7 @@ private:
QList
<
QAction
*>
actions
;
LocationButton
*
btnMore
;
QMenu
*
menuMore
;
QList
<
int
>
widths
;
};
#endif
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