Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
d6fe9289
Kaydet (Commit)
d6fe9289
authored
Haz 19, 2015
tarafından
Jan Holesovsky
Kaydeden (comit)
Andras Timar
Agu 06, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
rendercontext: Fix painting of double-buffered spinboxes.
Change-Id: I8cd2275d2607559c283d84d66b6d1f0588944cbe
üst
7f9a8f55
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
11 deletions
+26
-11
spinfld.cxx
vcl/source/control/spinfld.cxx
+25
-10
brdwin.cxx
vcl/source/window/brdwin.cxx
+1
-1
No files found.
vcl/source/control/spinfld.cxx
Dosyayı görüntüle @
d6fe9289
...
@@ -93,18 +93,26 @@ bool ImplDrawNativeSpinfield(vcl::RenderContext& rRenderContext, vcl::Window* pW
...
@@ -93,18 +93,26 @@ bool ImplDrawNativeSpinfield(vcl::RenderContext& rRenderContext, vcl::Window* pW
Rectangle
aClipRect
(
rSpinbuttonValue
.
maLowerRect
);
Rectangle
aClipRect
(
rSpinbuttonValue
.
maLowerRect
);
aClipRect
.
Union
(
rSpinbuttonValue
.
maUpperRect
);
aClipRect
.
Union
(
rSpinbuttonValue
.
maUpperRect
);
// convert from screen space to borderwin space
vcl
::
RenderContext
*
pContext
=
&
rRenderContext
;
aClipRect
.
SetPos
(
pBorder
->
ScreenToOutputPixel
(
pWin
->
OutputToScreenPixel
(
aClipRect
.
TopLeft
())));
vcl
::
Region
oldRgn
;
vcl
::
Region
oldRgn
(
pBorder
->
GetClipRegion
());
pBorder
->
SetClipRegion
(
vcl
::
Region
(
aClipRect
));
Point
aPt
;
Point
aPt
;
Size
aSize
(
pBorder
->
GetOutputSizePixel
());
// the size of the border window, i.e., the whole control
Size
aSize
(
pBorder
->
GetOutputSizePixel
());
// the size of the border window, i.e., the whole control
Rectangle
aBound
,
aContent
;
Rectangle
aNatRgn
(
aPt
,
aSize
);
Rectangle
aNatRgn
(
aPt
,
aSize
);
if
(
!
pWin
->
SupportsDoubleBuffering
())
{
// convert from screen space to borderwin space
aClipRect
.
SetPos
(
pBorder
->
ScreenToOutputPixel
(
pWin
->
OutputToScreenPixel
(
aClipRect
.
TopLeft
())));
oldRgn
=
pBorder
->
GetClipRegion
();
pBorder
->
SetClipRegion
(
vcl
::
Region
(
aClipRect
));
pContext
=
pBorder
;
}
Rectangle
aBound
,
aContent
;
if
(
!
ImplGetSVData
()
->
maNWFData
.
mbCanDrawWidgetAnySize
&&
if
(
!
ImplGetSVData
()
->
maNWFData
.
mbCanDrawWidgetAnySize
&&
p
Border
->
GetNativeControlRegion
(
CTRL_SPINBOX
,
PART_ENTIRE_CONTROL
,
p
Context
->
GetNativeControlRegion
(
CTRL_SPINBOX
,
PART_ENTIRE_CONTROL
,
aNatRgn
,
ControlState
::
NONE
,
rSpinbuttonValue
,
aNatRgn
,
ControlState
::
NONE
,
rSpinbuttonValue
,
OUString
(),
aBound
,
aContent
))
OUString
(),
aBound
,
aContent
))
{
{
...
@@ -112,10 +120,17 @@ bool ImplDrawNativeSpinfield(vcl::RenderContext& rRenderContext, vcl::Window* pW
...
@@ -112,10 +120,17 @@ bool ImplDrawNativeSpinfield(vcl::RenderContext& rRenderContext, vcl::Window* pW
}
}
Rectangle
aRgn
(
aPt
,
aSize
);
Rectangle
aRgn
(
aPt
,
aSize
);
bNativeOK
=
pBorder
->
DrawNativeControl
(
CTRL_SPINBOX
,
PART_ENTIRE_CONTROL
,
aRgn
,
if
(
pWin
->
SupportsDoubleBuffering
())
{
// convert from borderwin space, to the pWin's space
aRgn
.
SetPos
(
pWin
->
ScreenToOutputPixel
(
pBorder
->
OutputToScreenPixel
(
aRgn
.
TopLeft
())));
}
bNativeOK
=
pContext
->
DrawNativeControl
(
CTRL_SPINBOX
,
PART_ENTIRE_CONTROL
,
aRgn
,
ControlState
::
ENABLED
,
rSpinbuttonValue
,
OUString
());
ControlState
::
ENABLED
,
rSpinbuttonValue
,
OUString
());
pBorder
->
SetClipRegion
(
vcl
::
Region
(
oldRgn
));
if
(
!
pWin
->
SupportsDoubleBuffering
())
pBorder
->
SetClipRegion
(
vcl
::
Region
(
oldRgn
));
}
}
}
}
return
bNativeOK
;
return
bNativeOK
;
...
...
vcl/source/window/brdwin.cxx
Dosyayı görüntüle @
d6fe9289
...
@@ -753,7 +753,7 @@ void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, s
...
@@ -753,7 +753,7 @@ void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, s
if
((
aCtrlType
==
CTRL_SPINBOX
)
&&
!
pCtrl
->
IsNativeControlSupported
(
CTRL_SPINBOX
,
PART_BUTTON_UP
))
if
((
aCtrlType
==
CTRL_SPINBOX
)
&&
!
pCtrl
->
IsNativeControlSupported
(
CTRL_SPINBOX
,
PART_BUTTON_UP
))
{
{
Edit
*
pEdit
=
static_cast
<
Edit
*>
(
pCtrl
)
->
GetSubEdit
();
Edit
*
pEdit
=
static_cast
<
Edit
*>
(
pCtrl
)
->
GetSubEdit
();
if
(
pEdit
)
if
(
pEdit
&&
!
pEdit
->
SupportsDoubleBuffering
()
)
pCtrl
->
Paint
(
*
pCtrl
,
Rectangle
());
// make sure the buttons are also drawn as they might overwrite the border
pCtrl
->
Paint
(
*
pCtrl
,
Rectangle
());
// make sure the buttons are also drawn as they might overwrite the border
}
}
}
}
...
...
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