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
57626f21
Kaydet (Commit)
57626f21
authored
Ara 26, 2014
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Scale menu icons by a HiDPI scaling factor
Change-Id: I358794f86d541d2b49a8281a7224e5c6c29066d9
üst
e1043eca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
menu.cxx
vcl/source/window/menu.cxx
+19
-4
No files found.
vcl/source/window/menu.cxx
Dosyayı görüntüle @
57626f21
...
@@ -1557,9 +1557,14 @@ Size Menu::ImplCalcSize( const vcl::Window* pWin )
...
@@ -1557,9 +1557,14 @@ Size Menu::ImplCalcSize( const vcl::Window* pWin )
}
}
// Image:
// Image:
if
(
!
IsMenuBar
()
&&
((
pData
->
eType
==
MenuItemType
::
IMAGE
)
||
(
pData
->
eType
==
MenuItemType
::
STRINGIMAGE
)))
if
(
!
IsMenuBar
()
&&
((
pData
->
eType
==
MenuItemType
::
IMAGE
)
||
(
pData
->
eType
==
MenuItemType
::
STRINGIMAGE
)))
{
{
Size
aImgSz
=
pData
->
aImage
.
GetSizePixel
();
Size
aImgSz
=
pData
->
aImage
.
GetSizePixel
();
sal_Int32
nScaleFactor
=
pWindow
->
GetDPIScaleFactor
();
aImgSz
.
Height
()
*=
nScaleFactor
;
aImgSz
.
Width
()
*=
nScaleFactor
;
aImgSz
.
Height
()
+=
4
;
// add a border for native marks
aImgSz
.
Height
()
+=
4
;
// add a border for native marks
aImgSz
.
Width
()
+=
4
;
// add a border for native marks
aImgSz
.
Width
()
+=
4
;
// add a border for native marks
if
(
aImgSz
.
Width
()
>
aMaxImgSz
.
Width
()
)
if
(
aImgSz
.
Width
()
>
aMaxImgSz
.
Width
()
)
...
@@ -1927,10 +1932,20 @@ void Menu::ImplPaint( vcl::Window* pWin, sal_uInt16 nBorder, long nStartY, MenuI
...
@@ -1927,10 +1932,20 @@ void Menu::ImplPaint( vcl::Window* pWin, sal_uInt16 nBorder, long nStartY, MenuI
// Don't render an image for a check thing
// Don't render an image for a check thing
if
(
pData
->
bChecked
)
if
(
pData
->
bChecked
)
ImplPaintCheckBackground
(
pWin
,
aOuterCheckRect
,
pThisItemOnly
&&
bHighlighted
);
ImplPaintCheckBackground
(
pWin
,
aOuterCheckRect
,
pThisItemOnly
&&
bHighlighted
);
Image
aImage
=
pData
->
aImage
;
sal_Int32
nScaleFactor
=
pWindow
->
GetDPIScaleFactor
();
if
(
nScaleFactor
!=
1
)
{
BitmapEx
aBitmap
=
aImage
.
GetBitmapEx
();
aBitmap
.
Scale
(
nScaleFactor
,
nScaleFactor
,
BMP_SCALE_FAST
);
aImage
=
Image
(
aBitmap
);
}
aTmpPos
=
aOuterCheckRect
.
TopLeft
();
aTmpPos
=
aOuterCheckRect
.
TopLeft
();
aTmpPos
.
X
()
+=
(
aOuterCheckRect
.
GetWidth
()
-
pData
->
aImage
.
GetSizePixel
().
Width
())
/
2
;
aTmpPos
.
X
()
+=
(
aOuterCheckRect
.
GetWidth
()
-
aImage
.
GetSizePixel
().
Width
())
/
2
;
aTmpPos
.
Y
()
+=
(
aOuterCheckRect
.
GetHeight
()
-
pData
->
aImage
.
GetSizePixel
().
Height
())
/
2
;
aTmpPos
.
Y
()
+=
(
aOuterCheckRect
.
GetHeight
()
-
aImage
.
GetSizePixel
().
Height
())
/
2
;
pWin
->
DrawImage
(
aTmpPos
,
pData
->
aImage
,
nImageStyle
);
pWin
->
DrawImage
(
aTmpPos
,
aImage
,
nImageStyle
);
}
}
// Text:
// Text:
...
...
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