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
87892b6e
Commit
87892b6e
authored
Jul 30, 2019
by
Clément Fauconnier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
recolor function of UBGraphicsTextItem should use scene's isDarkBackground instead of settings
parent
e0b1417e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
4 deletions
+1
-4
UBGraphicsTextItem.cpp
src/domain/UBGraphicsTextItem.cpp
+0
-3
UBGraphicsTextItemDelegate.cpp
src/domain/UBGraphicsTextItemDelegate.cpp
+1
-1
No files found.
src/domain/UBGraphicsTextItem.cpp
View file @
87892b6e
...
@@ -246,9 +246,6 @@ void UBGraphicsTextItem::keyReleaseEvent(QKeyEvent *event)
...
@@ -246,9 +246,6 @@ void UBGraphicsTextItem::keyReleaseEvent(QKeyEvent *event)
void
UBGraphicsTextItem
::
paint
(
QPainter
*
painter
,
const
QStyleOptionGraphicsItem
*
option
,
QWidget
*
widget
)
void
UBGraphicsTextItem
::
paint
(
QPainter
*
painter
,
const
QStyleOptionGraphicsItem
*
option
,
QWidget
*
widget
)
{
{
QColor
color
=
UBSettings
::
settings
()
->
isDarkBackground
()
?
mColorOnDarkBackground
:
mColorOnLightBackground
;
setDefaultTextColor
(
color
);
// Never draw the rubber band, we draw our custom selection with the DelegateFrame
// Never draw the rubber band, we draw our custom selection with the DelegateFrame
QStyleOptionGraphicsItem
styleOption
=
QStyleOptionGraphicsItem
(
*
option
);
QStyleOptionGraphicsItem
styleOption
=
QStyleOptionGraphicsItem
(
*
option
);
styleOption
.
state
&=
~
QStyle
::
State_Selected
;
styleOption
.
state
&=
~
QStyle
::
State_Selected
;
...
...
src/domain/UBGraphicsTextItemDelegate.cpp
View file @
87892b6e
...
@@ -743,7 +743,7 @@ void UBGraphicsTextItemDelegate::recolor()
...
@@ -743,7 +743,7 @@ void UBGraphicsTextItemDelegate::recolor()
//setting new parameters
//setting new parameters
if
(
UBSettings
::
settings
()
->
isDarkBackground
())
if
(
delegated
()
->
scene
()
->
isDarkBackground
())
{
{
if
(
curBrush
.
color
()
==
Qt
::
black
)
if
(
curBrush
.
color
()
==
Qt
::
black
)
{
{
...
...
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