Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Tusooa Zhu
Krita
Commits
cf5ecf7e
Commit
cf5ecf7e
authored
Apr 04, 2007
by
Thomas Zander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix alignment; you have to pass both vertical and horizontal alignment...
Add api docs svn path=/trunk/koffice/; revision=650322
parent
ec32e6dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
libs/kofficeui/KoLayoutVisitor.cpp
libs/kofficeui/KoLayoutVisitor.cpp
+2
-2
libs/kofficeui/KoLayoutVisitor.h
libs/kofficeui/KoLayoutVisitor.h
+10
-0
No files found.
libs/kofficeui/KoLayoutVisitor.cpp
View file @
cf5ecf7e
...
...
@@ -100,8 +100,8 @@ void KoLayoutVisitor::relayout() {
if
(
!
column
.
contains
(
layout
))
column
.
insert
(
layout
,
item
.
label
);
layout
->
setAlignment
(
item
.
label
,
Qt
::
AlignRight
);
item
.
label
->
setAlignment
(
Qt
::
AlignRight
);
layout
->
setAlignment
(
item
.
label
,
Qt
::
AlignRight
|
Qt
::
AlignVCenter
);
item
.
label
->
setAlignment
(
Qt
::
AlignRight
|
Qt
::
AlignVCenter
);
}
void
finish
()
{
alterColumnWidth
();
...
...
libs/kofficeui/KoLayoutVisitor.h
View file @
cf5ecf7e
...
...
@@ -29,11 +29,21 @@
*/
class
KOFFICEUI_EXPORT
KoLayoutVisitor
{
public:
/// Constructor
KoLayoutVisitor
();
~
KoLayoutVisitor
();
/**
* Visit looks at the widget and all the widget placed on it (as children) and checks to see
* if they should be used for the layout process.
* @param widget the widget to visit.
*/
void
visit
(
QWidget
*
widget
);
/**
* This will do the actual work, which is to align the labels properly based on all the widgets visited.
* Call relayout only once after all the widgets are visited.
*/
void
relayout
();
private:
...
...
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