Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Unmaintained
KDE Pim
Commits
43e3a506
Commit
43e3a506
authored
Mar 25, 2013
by
Laurent Montel
😁
Browse files
Fix Bug 317198 - background-color for message window for HTML Message need to be adjustable
FIXED-IN: 4.11 BUG: 317198
parent
ffab58ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
kmail/configuredialog.cpp
View file @
43e3a506
...
...
@@ -980,6 +980,7 @@ static const struct {
{
"ColorbarBackgroundHTML"
,
I18N_NOOP
(
"HTML Status Bar Background - HTML Message"
)
},
{
"ColorbarForegroundHTML"
,
I18N_NOOP
(
"HTML Status Bar Foreground - HTML Message"
)
},
{
"BrokenAccountColor"
,
I18N_NOOP
(
"Broken Account - Folder Text Color"
)
},
{
"BackgroundColor"
,
I18N_NOOP
(
"Background Color"
)
},
};
static
const
int
numColorNames
=
sizeof
colorNames
/
sizeof
*
colorNames
;
...
...
@@ -1078,7 +1079,8 @@ void AppearancePage::ColorsTab::loadColor( bool loadFromConfig )
Qt
::
black
,
// colorbar plain fg
Qt
::
black
,
// colorbar html bg
Qt
::
white
,
// colorbar html fg
scheme
.
foreground
(
KColorScheme
::
NegativeText
).
color
()
//Broken Account Color
scheme
.
foreground
(
KColorScheme
::
NegativeText
).
color
(),
//Broken Account Color
scheme
.
background
().
color
()
// reader background color
};
for
(
int
i
=
0
;
i
<
numColorNames
;
i
++
)
{
...
...
@@ -1088,12 +1090,11 @@ void AppearancePage::ColorsTab::loadColor( bool loadFromConfig )
configName
==
QLatin1String
(
"ImportantMessageColor"
)
||
configName
==
QLatin1String
(
"TodoMessageColor"
)
)
{
mColorList
->
setColorSilently
(
i
,
messageListView
.
readEntry
(
configName
,
defaultColor
[
i
]
)
);
}
else
if
(
configName
==
QLatin1String
(
"BrokenAccountColor"
))
{
}
else
if
(
configName
==
QLatin1String
(
"BrokenAccountColor"
))
{
mColorList
->
setColorSilently
(
i
,
collectionFolderView
.
readEntry
(
configName
,
defaultColor
[
i
]));
}
else
}
else
{
mColorList
->
setColorSilently
(
i
,
reader
.
readEntry
(
configName
,
defaultColor
[
i
]
)
);
}
}
else
{
mColorList
->
setColorSilently
(
i
,
defaultColor
[
i
]
);
}
...
...
@@ -1116,6 +1117,8 @@ void AppearancePage::ColorsTab::save()
bool
customColors
=
mCustomColorCheck
->
isChecked
();
MessageCore
::
GlobalSettings
::
self
()
->
setUseDefaultColors
(
!
customColors
);
KColorScheme
scheme
(
QPalette
::
Active
,
KColorScheme
::
View
);
for
(
int
i
=
0
;
i
<
numColorNames
;
i
++
)
{
// Don't write color info when we use default colors, but write
// if it's already there:
...
...
@@ -1129,6 +1132,9 @@ void AppearancePage::ColorsTab::save()
}
else
if
(
configName
==
QLatin1String
(
"BrokenAccountColor"
))
{
if
(
customColors
||
collectionFolderView
.
hasKey
(
configName
)
)
collectionFolderView
.
writeEntry
(
configName
,
mColorList
->
color
(
i
));
}
else
if
(
configName
==
QLatin1String
(
"BackgroundColor"
))
{
if
(
customColors
&&
(
mColorList
->
color
(
i
)
!=
scheme
.
background
().
color
()
))
reader
.
writeEntry
(
configName
,
mColorList
->
color
(
i
));
}
else
{
if
(
customColors
||
reader
.
hasKey
(
configName
)
)
reader
.
writeEntry
(
configName
,
mColorList
->
color
(
i
)
);
...
...
messageviewer/csshelper.cpp
View file @
43e3a506
...
...
@@ -58,7 +58,6 @@ CSSHelper::CSSHelper( const QPaintDevice *pd ) :
mRecycleQuoteColors
=
reader
.
readEntry
(
"RecycleQuoteColors"
,
false
);
mForegroundColor
=
KColorScheme
(
QPalette
::
Active
).
foreground
().
color
();
mBackgroundColor
=
KColorScheme
(
QPalette
::
Active
).
background
().
color
();
if
(
!
MessageCore
::
GlobalSettings
::
self
()
->
useDefaultColors
()
)
{
mLinkColor
=
reader
.
readEntry
(
"LinkColor"
,
mLinkColor
);
...
...
@@ -80,6 +79,7 @@ CSSHelper::CSSHelper( const QPaintDevice *pd ) :
const
QString
key
=
"QuotedText"
+
QString
::
number
(
i
+
1
);
mQuoteColor
[
i
]
=
reader
.
readEntry
(
key
,
mQuoteColor
[
i
]
);
}
mBackgroundColor
=
reader
.
readEntry
(
"BackgroundColor"
,
mBackgroundColor
);
}
if
(
!
MessageCore
::
GlobalSettings
::
self
()
->
useDefaultFonts
()
)
{
...
...
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