[Libreoffice-commits] core.git: 2 commits - sw/source vcl/qt5
Jan-Marek Glogowski (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jul 11 14:45:53 UTC 2019
sw/source/uibase/misc/swruler.cxx | 5 ++---
vcl/qt5/Qt5Graphics_Controls.cxx | 20 ++++++++------------
2 files changed, 10 insertions(+), 15 deletions(-)
New commits:
commit 2060f9598bc4480c44465abc9250b595c09af188
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Thu Jul 11 12:50:42 2019 +0000
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Thu Jul 11 16:40:03 2019 +0200
tdf#126333 use dialog color for "button" highlight
This control has many more problems. This is just a minimal
fix, so it'll use dialog color for the highlight. In addition
it uses the same color for the arrow then for the text.
Change-Id: Iaf263087bc09309267b2d165331d710dfc92fc77
Reviewed-on: https://gerrit.libreoffice.org/75419
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx
index a15dde147442..874ab6e81e1e 100644
--- a/sw/source/uibase/misc/swruler.cxx
+++ b/sw/source/uibase/misc/swruler.cxx
@@ -119,7 +119,7 @@ void SwCommentRuler::DrawCommentControl(vcl::RenderContext& rRenderContext)
// Paint comment control background
// TODO Check if these are best colors to be used
- Color aBgColor = GetFadedColor( rStyleSettings.GetDarkShadowColor(), rStyleSettings.GetWorkspaceColor() );
+ Color aBgColor = GetFadedColor( rStyleSettings.GetDialogColor(), rStyleSettings.GetWorkspaceColor() );
maVirDev->SetFillColor( aBgColor );
if ( mbIsHighlighted || !bIsCollapsed )
@@ -188,8 +188,7 @@ void SwCommentRuler::DrawCommentControl(vcl::RenderContext& rRenderContext)
// Draw arrow
// FIXME consistence of button colors. https://opengrok.libreoffice.org/xref/core/vcl/source/control/button.cxx#785
- Color aArrowColor = GetFadedColor(COL_BLACK, rStyleSettings.GetShadowColor());
- ImplDrawArrow(*maVirDev, aArrowPos.X(), aArrowPos.Y(), aArrowColor, bArrowToRight);
+ ImplDrawArrow(*maVirDev, aArrowPos.X(), aArrowPos.Y(), aTextColor, bArrowToRight);
// Blit comment control
rRenderContext.DrawOutDev(aControlRect.TopLeft(), aControlRect.GetSize(), Point(), aControlRect.GetSize(), *maVirDev);
commit d3ed5a8d6b3c86844532927c6450ffddc63549a3
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Thu Jul 11 02:45:32 2019 +0000
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Thu Jul 11 16:39:08 2019 +0200
Qt5 fix drawing of the toolbar handle
This is visible in Writer, where the 2nd toolbar misses the handle.
Change-Id: Iddf3a002c9d75f668c40977cf02671640b38f083
Reviewed-on: https://gerrit.libreoffice.org/75417
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
diff --git a/vcl/qt5/Qt5Graphics_Controls.cxx b/vcl/qt5/Qt5Graphics_Controls.cxx
index 32a2d132efc5..08e57f53f5a6 100644
--- a/vcl/qt5/Qt5Graphics_Controls.cxx
+++ b/vcl/qt5/Qt5Graphics_Controls.cxx
@@ -399,24 +399,20 @@ bool Qt5Graphics_Controls::drawNativeControl(ControlType type, ControlPart part,
}
else if ((type == ControlType::Toolbar)
&& (part == ControlPart::ThumbVert || part == ControlPart::ThumbHorz))
- { // reduce paint area only to the handle area
+ {
+ // reduce paint area only to the handle area
const int handleExtend = QApplication::style()->pixelMetric(QStyle::PM_ToolBarHandleExtent);
QStyleOption option;
- option.state = vclStateValue2StateFlag(nControlState, value);
-
- QPainter painter(m_image.get());
+ QRect aRect = m_image->rect();
if (part == ControlPart::ThumbVert)
{
- option.rect = QRect(0, 0, handleExtend, widgetRect.height());
- painter.setClipRect(widgetRect.x(), widgetRect.y(), handleExtend, widgetRect.height());
- option.state |= QStyle::State_Horizontal;
+ aRect.setWidth(handleExtend);
+ option.state = QStyle::State_Horizontal;
}
else
- {
- option.rect = QRect(0, 0, widgetRect.width(), handleExtend);
- painter.setClipRect(widgetRect.x(), widgetRect.y(), widgetRect.width(), handleExtend);
- }
- QApplication::style()->drawPrimitive(QStyle::PE_IndicatorToolBarHandle, &option, &painter);
+ aRect.setHeight(handleExtend);
+ draw(QStyle::PE_IndicatorToolBarHandle, &option, m_image.get(),
+ vclStateValue2StateFlag(nControlState, value), aRect);
}
else if (type == ControlType::Editbox || type == ControlType::MultilineEditbox)
{
More information about the Libreoffice-commits
mailing list