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
758916a8
Kaydet (Commit)
758916a8
authored
Haz 04, 2015
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix status bar flickering (zoom slider fo example)
Change-Id: I3fb71868a9f8f56c76353f3a2d84fdb078c8f8fb
üst
8ae25bbc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
67 deletions
+31
-67
status.hxx
include/vcl/status.hxx
+1
-1
status.cxx
vcl/source/window/status.cxx
+30
-66
No files found.
include/vcl/status.hxx
Dosyayı görüntüle @
758916a8
...
@@ -96,7 +96,7 @@ private:
...
@@ -96,7 +96,7 @@ private:
using
Window
::
ImplInit
;
using
Window
::
ImplInit
;
SAL_DLLPRIVATE
void
ImplInit
(
vcl
::
Window
*
pParent
,
WinBits
nStyle
);
SAL_DLLPRIVATE
void
ImplInit
(
vcl
::
Window
*
pParent
,
WinBits
nStyle
);
SAL_DLLPRIVATE
void
ImplInitSettings
(
bool
bFont
,
bool
bForeground
,
bool
bBackground
);
SAL_DLLPRIVATE
void
ImplInitSettings
();
SAL_DLLPRIVATE
void
ImplFormat
();
SAL_DLLPRIVATE
void
ImplFormat
();
SAL_DLLPRIVATE
bool
ImplIsItemUpdate
();
SAL_DLLPRIVATE
bool
ImplIsItemUpdate
();
...
...
vcl/source/window/status.cxx
Dosyayı görüntüle @
758916a8
...
@@ -123,7 +123,7 @@ void StatusBar::ImplInit( vcl::Window* pParent, WinBits nStyle )
...
@@ -123,7 +123,7 @@ void StatusBar::ImplInit( vcl::Window* pParent, WinBits nStyle )
// remember WinBits
// remember WinBits
mpItemList
=
new
ImplStatusItemList
;
mpItemList
=
new
ImplStatusItemList
;
mpImplData
->
mpVirDev
=
VclPtr
<
VirtualDevice
>::
Create
(
*
this
);
mpImplData
->
mpVirDev
=
VclPtr
<
VirtualDevice
>::
Create
(
*
this
);
mnCurItemId
=
0
;
mnCurItemId
=
0
;
mbFormat
=
true
;
mbFormat
=
true
;
mbVisibleItems
=
true
;
mbVisibleItems
=
true
;
...
@@ -137,8 +137,7 @@ void StatusBar::ImplInit( vcl::Window* pParent, WinBits nStyle )
...
@@ -137,8 +137,7 @@ void StatusBar::ImplInit( vcl::Window* pParent, WinBits nStyle )
mnItemY
=
STATUSBAR_OFFSET_Y
;
mnItemY
=
STATUSBAR_OFFSET_Y
;
mnTextY
=
STATUSBAR_OFFSET_TEXTY
;
mnTextY
=
STATUSBAR_OFFSET_TEXTY
;
ImplInitSettings
(
true
,
true
,
true
);
ImplInitSettings
();
SetLineColor
();
SetOutputSizePixel
(
CalcWindowSizePixel
()
);
SetOutputSizePixel
(
CalcWindowSizePixel
()
);
}
}
...
@@ -175,6 +174,8 @@ void StatusBar::AdjustItemWidthsForHiDPI(bool bAdjustHiDPI)
...
@@ -175,6 +174,8 @@ void StatusBar::AdjustItemWidthsForHiDPI(bool bAdjustHiDPI)
void
StatusBar
::
ApplySettings
(
vcl
::
RenderContext
&
rRenderContext
)
void
StatusBar
::
ApplySettings
(
vcl
::
RenderContext
&
rRenderContext
)
{
{
rRenderContext
.
SetLineColor
();
const
StyleSettings
&
rStyleSettings
=
rRenderContext
.
GetSettings
().
GetStyleSettings
();
const
StyleSettings
&
rStyleSettings
=
rRenderContext
.
GetSettings
().
GetStyleSettings
();
vcl
::
Font
aFont
=
rStyleSettings
.
GetToolFont
();
vcl
::
Font
aFont
=
rStyleSettings
.
GetToolFont
();
if
(
IsControlFont
())
if
(
IsControlFont
())
...
@@ -209,56 +210,15 @@ void StatusBar::ApplySettings(vcl::RenderContext& rRenderContext)
...
@@ -209,56 +210,15 @@ void StatusBar::ApplySettings(vcl::RenderContext& rRenderContext)
}
}
}
}
void
StatusBar
::
ImplInitSettings
(
bool
bFont
,
bool
bForeground
,
bool
bBackground
)
void
StatusBar
::
ImplInitSettings
()
{
{
const
StyleSettings
&
rStyleSettings
=
GetSettings
().
GetStyleSettings
();
ApplySettings
(
*
this
);
if
(
bFont
)
{
vcl
::
Font
aFont
=
rStyleSettings
.
GetToolFont
();
if
(
IsControlFont
())
aFont
.
Merge
(
GetControlFont
());
SetZoomedPointFont
(
*
this
,
aFont
);
}
if
(
bForeground
||
bFont
)
{
Color
aColor
;
if
(
IsControlForeground
())
aColor
=
GetControlForeground
();
else
if
(
GetStyle
()
&
WB_3DLOOK
)
aColor
=
rStyleSettings
.
GetButtonTextColor
();
else
aColor
=
rStyleSettings
.
GetWindowTextColor
();
SetTextColor
(
aColor
);
SetTextFillColor
();
mpImplData
->
mpVirDev
->
SetFont
(
GetFont
()
);
mpImplData
->
mpVirDev
->
SetTextColor
(
GetTextColor
()
);
mpImplData
->
mpVirDev
->
SetTextAlign
(
GetTextAlign
()
);
mpImplData
->
mpVirDev
->
SetTextFillColor
();
}
if
(
bBackground
)
mpImplData
->
mpVirDev
->
SetFont
(
GetFont
());
{
mpImplData
->
mpVirDev
->
SetTextColor
(
GetTextColor
());
Color
aColor
;
mpImplData
->
mpVirDev
->
SetTextAlign
(
GetTextAlign
());
if
(
IsControlBackground
()
)
mpImplData
->
mpVirDev
->
SetTextFillColor
();
aColor
=
GetControlBackground
();
mpImplData
->
mpVirDev
->
SetBackground
(
GetBackground
());
else
if
(
GetStyle
()
&
WB_3DLOOK
)
aColor
=
rStyleSettings
.
GetFaceColor
();
else
aColor
=
rStyleSettings
.
GetWindowColor
();
SetBackground
(
aColor
);
mpImplData
->
mpVirDev
->
SetBackground
(
GetBackground
()
);
// NWF background
if
(
!
IsControlBackground
()
&&
IsNativeControlSupported
(
CTRL_WINDOW_BACKGROUND
,
PART_BACKGROUND_WINDOW
)
)
{
ImplGetWindowImpl
()
->
mnNativeBackground
=
PART_BACKGROUND_WINDOW
;
EnableChildTransparentMode
(
true
);
}
}
}
}
void
StatusBar
::
ImplFormat
()
void
StatusBar
::
ImplFormat
()
...
@@ -745,7 +705,20 @@ void StatusBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
...
@@ -745,7 +705,20 @@ void StatusBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
sal_uInt16
nItemCount
=
sal_uInt16
(
mpItemList
->
size
()
);
sal_uInt16
nItemCount
=
sal_uInt16
(
mpItemList
->
size
()
);
if
(
mbProgressMode
)
if
(
mbProgressMode
)
{
rRenderContext
.
Push
(
PushFlags
::
FILLCOLOR
|
PushFlags
::
LINECOLOR
);
const
StyleSettings
&
rStyleSettings
=
rRenderContext
.
GetSettings
().
GetStyleSettings
();
Color
aProgressColor
=
rStyleSettings
.
GetHighlightColor
();
if
(
aProgressColor
==
rStyleSettings
.
GetFaceColor
())
aProgressColor
=
rStyleSettings
.
GetDarkShadowColor
();
rRenderContext
.
SetLineColor
();
rRenderContext
.
SetFillColor
(
aProgressColor
);
ImplDrawProgress
(
rRenderContext
,
true
,
0
,
mnPercent
);
ImplDrawProgress
(
rRenderContext
,
true
,
0
,
mnPercent
);
rRenderContext
.
Pop
();
}
else
else
{
{
// draw text
// draw text
...
@@ -756,7 +729,7 @@ void StatusBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
...
@@ -756,7 +729,7 @@ void StatusBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
if
(
mbVisibleItems
)
if
(
mbVisibleItems
)
{
{
for
(
sal_uInt16
i
=
0
;
i
<
nItemCount
;
i
++
)
for
(
sal_uInt16
i
=
0
;
i
<
nItemCount
;
i
++
)
ImplDrawItem
(
rRenderContext
,
fals
e
,
i
,
true
,
true
);
ImplDrawItem
(
rRenderContext
,
tru
e
,
i
,
true
,
true
);
}
}
}
}
...
@@ -869,17 +842,17 @@ void StatusBar::StateChanged( StateChangedType nType )
...
@@ -869,17 +842,17 @@ void StatusBar::StateChanged( StateChangedType nType )
(
nType
==
StateChangedType
::
ControlFont
)
)
(
nType
==
StateChangedType
::
ControlFont
)
)
{
{
mbFormat
=
true
;
mbFormat
=
true
;
ImplInitSettings
(
true
,
false
,
false
);
ImplInitSettings
();
Invalidate
();
Invalidate
();
}
}
else
if
(
nType
==
StateChangedType
::
ControlForeground
)
else
if
(
nType
==
StateChangedType
::
ControlForeground
)
{
{
ImplInitSettings
(
false
,
true
,
false
);
ImplInitSettings
();
Invalidate
();
Invalidate
();
}
}
else
if
(
nType
==
StateChangedType
::
ControlBackground
)
else
if
(
nType
==
StateChangedType
::
ControlBackground
)
{
{
ImplInitSettings
(
false
,
false
,
true
);
ImplInitSettings
();
Invalidate
();
Invalidate
();
}
}
}
}
...
@@ -897,7 +870,7 @@ void StatusBar::DataChanged( const DataChangedEvent& rDCEvt )
...
@@ -897,7 +870,7 @@ void StatusBar::DataChanged( const DataChangedEvent& rDCEvt )
)
)
{
{
mbFormat
=
true
;
mbFormat
=
true
;
ImplInitSettings
(
true
,
true
,
true
);
ImplInitSettings
();
long
nFudge
=
GetTextHeight
()
/
4
;
long
nFudge
=
GetTextHeight
()
/
4
;
for
(
size_t
i
=
0
,
n
=
mpItemList
->
size
();
i
<
n
;
++
i
)
for
(
size_t
i
=
0
,
n
=
mpItemList
->
size
();
i
<
n
;
++
i
)
{
{
...
@@ -1258,7 +1231,7 @@ void StatusBar::SetItemData( sal_uInt16 nItemId, void* pNewData )
...
@@ -1258,7 +1231,7 @@ void StatusBar::SetItemData( sal_uInt16 nItemId, void* pNewData )
{
{
Update
();
Update
();
Rectangle
aRect
=
ImplGetItemRectPos
(
nPos
);
Rectangle
aRect
=
ImplGetItemRectPos
(
nPos
);
Invalidate
(
aRect
);
Invalidate
(
aRect
,
InvalidateFlags
::
NoErase
);
Flush
();
Flush
();
}
}
}
}
...
@@ -1379,12 +1352,6 @@ void StatusBar::StartProgressMode( const OUString& rText )
...
@@ -1379,12 +1352,6 @@ void StatusBar::StartProgressMode( const OUString& rText )
ImplCalcProgressRect
();
ImplCalcProgressRect
();
// trigger Paint, which draws text and frame
// trigger Paint, which draws text and frame
const
StyleSettings
&
rStyleSettings
=
GetSettings
().
GetStyleSettings
();
Color
aPrgsColor
=
rStyleSettings
.
GetHighlightColor
();
if
(
aPrgsColor
==
rStyleSettings
.
GetFaceColor
()
)
aPrgsColor
=
rStyleSettings
.
GetDarkShadowColor
();
SetLineColor
();
SetFillColor
(
aPrgsColor
);
if
(
IsReallyVisible
()
)
if
(
IsReallyVisible
()
)
{
{
Invalidate
();
Invalidate
();
...
@@ -1403,7 +1370,6 @@ void StatusBar::SetProgressValue( sal_uInt16 nNewPercent )
...
@@ -1403,7 +1370,6 @@ void StatusBar::SetProgressValue( sal_uInt16 nNewPercent )
&&
(
!
mnPercent
||
(
mnPercent
!=
nNewPercent
))
)
&&
(
!
mnPercent
||
(
mnPercent
!=
nNewPercent
))
)
{
{
Update
();
Update
();
SetLineColor
();
Invalidate
();
Invalidate
();
Flush
();
Flush
();
}
}
...
@@ -1417,8 +1383,6 @@ void StatusBar::EndProgressMode()
...
@@ -1417,8 +1383,6 @@ void StatusBar::EndProgressMode()
mbProgressMode
=
false
;
mbProgressMode
=
false
;
maPrgsTxt
.
clear
();
maPrgsTxt
.
clear
();
// re-trigger Paint to recreate StatusBar
SetFillColor
(
GetSettings
().
GetStyleSettings
().
GetFaceColor
()
);
if
(
IsReallyVisible
()
)
if
(
IsReallyVisible
()
)
{
{
Invalidate
();
Invalidate
();
...
...
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