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
fb8d0502
Kaydet (Commit)
fb8d0502
authored
May 14, 2015
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
refactor AboutDialog to use RenderContext
Change-Id: I7ce9df8c9f26d417d2400628cbb91f8ae18bc4d6
üst
95887e62
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
16 deletions
+18
-16
about.cxx
cui/source/dialogs/about.cxx
+18
-16
No files found.
cui/source/dialogs/about.cxx
Dosyayı görüntüle @
fb8d0502
...
...
@@ -160,23 +160,25 @@ void AboutDialog::StyleControls()
m_pDescriptionText
->
SetPaintTransparent
(
true
);
m_pCopyrightText
->
SetPaintTransparent
(
true
);
vcl
::
Font
aLabelFont
=
GetSettings
().
GetStyleSettings
().
GetLabelFont
();
const
StyleSettings
&
rStyleSettings
=
Application
::
GetSettings
().
GetStyleSettings
();
vcl
::
Font
aLabelFont
=
rStyleSettings
.
GetLabelFont
();
vcl
::
Font
aLargeFont
=
aLabelFont
;
aLargeFont
.
SetSize
(
Size
(
0
,
aLabelFont
.
GetSize
().
Height
()
*
3
)
);
aLargeFont
.
SetSize
(
Size
(
0
,
aLabelFont
.
GetSize
().
Height
()
*
3
)
);
// Logo Replacement Text
m_pLogoReplacement
->
SetControlFont
(
aLargeFont
);
m_pLogoReplacement
->
SetControlFont
(
aLargeFont
);
// Description Text
aLargeFont
.
SetSize
(
Size
(
0
,
aLabelFont
.
GetSize
().
Height
()
*
1.3
)
);
aLargeFont
.
SetSize
(
Size
(
0
,
aLabelFont
.
GetSize
().
Height
()
*
1.3
)
);
m_pDescriptionText
->
SetControlFont
(
aLargeFont
);
// Version Text
aLargeFont
.
SetSize
(
Size
(
0
,
aLabelFont
.
GetSize
().
Height
()
*
1.2
)
);
aLargeFont
.
SetSize
(
Size
(
0
,
aLabelFont
.
GetSize
().
Height
()
*
1.2
)
);
m_pVersion
->
SetControlFont
(
aLargeFont
);
// If not in high-contrast mode, hard-code colors
if
(
!
(
Application
::
GetSettings
().
GetStyleSettings
().
GetHighContrastMode
())
)
if
(
!
rStyleSettings
.
GetHighContrastMode
()
)
{
m_pLogoReplacement
->
SetControlForeground
(
Color
(
51
,
51
,
51
));
m_pVersion
->
SetControlForeground
(
Color
(
102
,
102
,
102
));
...
...
@@ -195,8 +197,8 @@ void AboutDialog::SetLogo()
aDrawOpt
.
SetAntiAliasing
(
true
);
// load svg logo, specify desired width, scale height isotrophically
if
(
SfxApplication
::
loadBrandSvg
(
"flat_logo"
,
aLogoBitmap
,
nWidth
)
&&
!
aLogoBitmap
.
IsEmpty
()
)
if
(
SfxApplication
::
loadBrandSvg
(
"flat_logo"
,
aLogoBitmap
,
nWidth
)
&&
!
aLogoBitmap
.
IsEmpty
())
{
m_pLogoImage
->
SetImage
(
Image
(
aLogoBitmap
));
m_pLogoReplacement
->
Hide
();
...
...
@@ -213,21 +215,23 @@ void AboutDialog::SetLogo()
void
AboutDialog
::
Resize
()
{
SfxModalDialog
::
Resize
();
// Load background image
if
(
isInitialLayout
(
this
)
&&
!
(
Application
::
GetSettings
().
GetStyleSettings
().
GetHighContrastMode
()))
{
SfxApplication
::
loadBrandSvg
(
"shell/about"
,
aBackgroundBitmap
,
Get
Output
SizePixel
().
Width
());
SfxApplication
::
loadBrandSvg
(
"shell/about"
,
aBackgroundBitmap
,
GetSizePixel
().
Width
());
}
}
void
AboutDialog
::
Paint
(
vcl
::
RenderContext
&
/*rRenderContext*/
,
const
Rectangle
&
rRect
)
void
AboutDialog
::
Paint
(
vcl
::
RenderContext
&
rRenderContext
,
const
Rectangle
&
rRect
)
{
SetClipRegion
(
vcl
::
Region
(
rRect
));
rRenderContext
.
SetClipRegion
(
vcl
::
Region
(
rRect
));
Size
aSize
(
GetOutputSizePixel
());
Size
aSize
(
rRenderContext
.
GetOutputSizePixel
());
Point
aPos
(
aSize
.
Width
()
-
aBackgroundBitmap
.
GetSizePixel
().
Width
(),
aSize
.
Height
()
-
aBackgroundBitmap
.
GetSizePixel
().
Height
());
DrawBitmapEx
(
aPos
,
aBackgroundBitmap
);
aSize
.
Height
()
-
aBackgroundBitmap
.
GetSizePixel
().
Height
());
rRenderContext
.
DrawBitmapEx
(
aPos
,
aBackgroundBitmap
);
}
OUString
AboutDialog
::
GetBuildId
()
...
...
@@ -274,9 +278,7 @@ OUString AboutDialog::GetVersionString()
OUString
sVersion
=
m_aVersionTextStr
;
#ifdef _WIN64
sVersion
+=
" (x64)"
;
#endif
OUString
sBuildId
=
GetBuildId
();
...
...
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