Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
786ae035
Commit
786ae035
authored
Aug 08, 2012
by
Yimgo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modifications from
cfd4f8d1
merged.
parent
fa5fa92b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
21 deletions
+18
-21
UBGraphicsWidgetItem.cpp
src/domain/UBGraphicsWidgetItem.cpp
+18
-21
No files found.
src/domain/UBGraphicsWidgetItem.cpp
View file @
786ae035
...
...
@@ -110,7 +110,7 @@ void UBGraphicsWidgetItem::initialize()
connect
(
page
()
->
mainFrame
(),
SIGNAL
(
javaScriptWindowObjectCleared
()),
this
,
SLOT
(
javaScriptWindowObjectCleared
()));
connect
(
page
(),
SIGNAL
(
geometryChangeRequested
(
const
QRect
&
)),
this
,
SLOT
(
geometryChangeRequested
(
const
QRect
&
)));
connect
(
page
()
,
SIGNAL
(
loadFinished
(
bool
)),
this
,
SLOT
(
mainFrameLoadFinished
(
bool
)));
connect
(
this
,
SIGNAL
(
loadFinished
(
bool
)),
this
,
SLOT
(
mainFrameLoadFinished
(
bool
)));
}
QUrl
UBGraphicsWidgetItem
::
mainHtml
()
...
...
@@ -566,33 +566,30 @@ void UBGraphicsWidgetItem::paint( QPainter *painter, const QStyleOptionGraphicsI
{
if
(
mIsFrozen
)
painter
->
drawPixmap
(
0
,
0
,
mSnapshot
);
else
if
(
mIsTakingSnapshot
||
(
mInitialLoadDone
&&
!
mLoadIsErronous
))
else
QGraphicsWebView
::
paint
(
painter
,
option
,
widget
);
else
{
QString
message
=
tr
(
"Loading ..."
)
;
if
(
!
mInitialLoadDone
||
mLoadIsErronous
)
{
QString
message
;
/* this is the right way of doing but we receive two callback and the one return always that the
* load as failed... to check
if (mLoadIsErronous)
message = tr("Cannot load content");
else
message = tr("Loading ...");
*/
if
(
mInitialLoadDone
&&
mLoadIsErronous
)
message
=
tr
(
"Cannot load content"
);
else
message
=
tr
(
"Loading ..."
);
painter
->
setFont
(
QFont
(
"Arial"
,
12
));
painter
->
setFont
(
QFont
(
"Arial"
,
12
));
QFontMetrics
fm
=
painter
->
fontMetrics
();
QRect
txtBoundingRect
=
fm
.
boundingRect
(
message
);
QFontMetrics
fm
=
painter
->
fontMetrics
();
QRect
txtBoundingRect
=
fm
.
boundingRect
(
message
);
txtBoundingRect
.
moveCenter
(
rect
().
center
().
toPoint
());
txtBoundingRect
.
adjust
(
-
10
,
-
5
,
10
,
5
);
txtBoundingRect
.
moveCenter
(
rect
().
center
().
toPoint
());
txtBoundingRect
.
adjust
(
-
10
,
-
5
,
10
,
5
);
painter
->
setPen
(
Qt
::
NoPen
);
painter
->
setBrush
(
UBSettings
::
paletteColor
);
painter
->
drawRoundedRect
(
txtBoundingRect
,
3
,
3
);
painter
->
setPen
(
Qt
::
NoPen
);
painter
->
setBrush
(
UBSettings
::
paletteColor
);
painter
->
drawRoundedRect
(
txtBoundingRect
,
3
,
3
);
painter
->
setPen
(
Qt
::
white
);
painter
->
drawText
(
rect
(),
Qt
::
AlignCenter
,
message
);
painter
->
setPen
(
Qt
::
white
);
painter
->
drawText
(
rect
(),
Qt
::
AlignCenter
,
message
);
}
}
...
...
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