Kaydet (Commit) bb2d5c40 authored tarafından Caolán McNamara's avatar Caolán McNamara

Related: fdo#36815 clip overlarge comment contents

and add an indicator that the comment won't fit in the space available

Change-Id: I8dce7dfa678a606e8c4532addc4ba70c2a43644e
üst 22248974
...@@ -121,28 +121,13 @@ void SidebarTxtControl::RequestHelp(const HelpEvent &rEvt) ...@@ -121,28 +121,13 @@ void SidebarTxtControl::RequestHelp(const HelpEvent &rEvt)
void SidebarTxtControl::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, sal_uLong) void SidebarTxtControl::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, sal_uLong)
{ {
if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) //Take the control's height, but overwrite the scrollbar area if there was one
{ Size aSize(PixelToLogic(GetSizePixel()));
if ( mrSidebarWin.IsMouseOverSidebarWin() || aSize.Width() = rSz.Width();
HasFocus() )
{
pDev->DrawGradient( Rectangle( Point(0,0) + rPt, PixelToLogic(GetSizePixel()) ),
Gradient( GradientStyle_LINEAR,
mrSidebarWin.ColorDark(),
mrSidebarWin.ColorDark() ) );
}
else
{
pDev->DrawGradient( Rectangle( Point(0,0) + rPt, PixelToLogic(GetSizePixel()) ),
Gradient( GradientStyle_LINEAR,
mrSidebarWin.ColorLight(),
mrSidebarWin.ColorDark()));
}
}
if ( GetTextView() ) if ( GetTextView() )
{ {
GetTextView()->GetOutliner()->Draw(pDev, Rectangle(rPt, rSz)); GetTextView()->GetOutliner()->Draw(pDev, Rectangle(rPt, aSize));
} }
if ( mrSidebarWin.GetLayoutStatus()==SwPostItHelper::DELETED ) if ( mrSidebarWin.GetLayoutStatus()==SwPostItHelper::DELETED )
......
...@@ -229,16 +229,8 @@ void SwSidebarWin::Paint( const Rectangle& rRect) ...@@ -229,16 +229,8 @@ void SwSidebarWin::Paint( const Rectangle& rRect)
void SwSidebarWin::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, sal_uLong nInFlags) void SwSidebarWin::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, sal_uLong nInFlags)
{ {
if (mpMetadataAuthor->IsVisible() ) if (mpMetadataAuthor->IsVisible() )
{
//draw left over space
if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
pDev->SetFillColor(COL_BLACK);
}
else
{ {
pDev->SetFillColor(mColorDark); pDev->SetFillColor(mColorDark);
}
pDev->SetLineColor(); pDev->SetLineColor();
pDev->DrawRect( Rectangle( rPt, rSz ) ); pDev->DrawRect( Rectangle( rPt, rSz ) );
} }
...@@ -279,6 +271,27 @@ void SwSidebarWin::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, s ...@@ -279,6 +271,27 @@ void SwSidebarWin::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, s
if (mpTextRangeOverlay) if (mpTextRangeOverlay)
pProcessor->process(mpTextRangeOverlay->getOverlayObjectPrimitive2DSequence()); pProcessor->process(mpTextRangeOverlay->getOverlayObjectPrimitive2DSequence());
delete pProcessor; delete pProcessor;
if (mpVScrollbar->IsVisible())
{
Font aOrigFont(mpMetadataDate->GetControlFont());
Color aOrigBg( mpMetadataDate->GetControlBackground() );
OUString sOrigText(mpMetadataDate->GetText());
Size aSize(PixelToLogic(mpMenuButton->GetSizePixel()));
Point aPos(PixelToLogic(mpMenuButton->GetPosPixel()));
aPos += rPt;
Font aFont( mpMetadataDate->GetSettings().GetStyleSettings().GetFieldFont() );
mpMetadataDate->SetControlFont( aFont );
mpMetadataDate->SetControlBackground( 0xFFFFFF );
mpMetadataDate->SetText("...");
mpMetadataDate->Draw(pDev, aPos, aSize, nInFlags);
mpMetadataDate->SetText(sOrigText);
mpMetadataDate->SetControlFont( aOrigFont );
mpMetadataDate->SetControlBackground( aOrigBg );
}
} }
void SwSidebarWin::SetPosSizePixelRect( long nX, void SwSidebarWin::SetPosSizePixelRect( long nX,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment