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
17f358d7
Kaydet (Commit)
17f358d7
authored
Şub 19, 2015
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Support HiDPI in auto filter (and pivot table) pop-up menu window
Change-Id: I752a4bc01425c09e2bd3cc8cac96f3cf22f1222d
üst
5aadcced
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
15 deletions
+40
-15
checklistmenu.cxx
sc/source/ui/cctrl/checklistmenu.cxx
+40
-15
No files found.
sc/source/ui/cctrl/checklistmenu.cxx
Dosyayı görüntüle @
17f358d7
...
...
@@ -84,7 +84,8 @@ ScMenuFloatingWindow::ScMenuFloatingWindow(vcl::Window* pParent, ScDocument* pDo
SetMenuStackLevel
(
nMenuStackLevel
);
// TODO: How do we get the right font to use here ?
const
sal_uInt16
nPopupFontHeight
=
12
;
sal_Int32
nScaleFactor
=
GetDPIScaleFactor
();
const
sal_uInt16
nPopupFontHeight
=
12
*
nScaleFactor
;
const
StyleSettings
&
rStyle
=
GetSettings
().
GetStyleSettings
();
maLabelFont
=
rStyle
.
GetLabelFont
();
maLabelFont
.
SetHeight
(
nPopupFontHeight
);
...
...
@@ -864,9 +865,13 @@ ScCheckListMenuWindow::ScCheckListMenuWindow(vcl::Window* pParent, ScDocument* p
mpExtendedData
(
NULL
),
mpOKAction
(
NULL
),
mpPopupEndAction
(
NULL
),
maWndSize
(
200
,
330
),
maWndSize
(),
mePrevToggleAllState
(
TRISTATE_INDET
)
{
sal_Int32
nScaleFactor
=
GetDPIScaleFactor
();
maWndSize
=
Size
(
200
*
nScaleFactor
,
330
*
nScaleFactor
);
maTabStopCtrls
.
reserve
(
7
);
maTabStopCtrls
.
push_back
(
this
);
maTabStopCtrls
.
push_back
(
&
maChecks
);
...
...
@@ -887,18 +892,20 @@ ScCheckListMenuWindow::~ScCheckListMenuWindow()
void
ScCheckListMenuWindow
::
getSectionPosSize
(
Point
&
rPos
,
Size
&
rSize
,
SectionType
eType
)
const
{
sal_Int32
nScaleFactor
=
GetDPIScaleFactor
();
// constant parameters.
const
long
nListBoxMargin
=
5
;
// horizontal distance from the side of the dialog to the listbox border.
const
long
nListBoxInnerPadding
=
5
;
const
long
nTopMargin
=
5
;
const
long
nListBoxMargin
=
5
*
nScaleFactor
;
// horizontal distance from the side of the dialog to the listbox border.
const
long
nListBoxInnerPadding
=
5
*
nScaleFactor
;
const
long
nTopMargin
=
5
*
nScaleFactor
;
const
long
nMenuHeight
=
maMenuSize
.
getHeight
();
const
long
nSingleItemBtnAreaHeight
=
32
;
// height of the middle area below the list box where the single-action buttons are.
const
long
nBottomBtnAreaHeight
=
50
;
// height of the bottom area where the OK and Cancel buttons are.
const
long
nBtnWidth
=
90
;
const
long
nSingleItemBtnAreaHeight
=
32
*
nScaleFactor
;
// height of the middle area below the list box where the single-action buttons are.
const
long
nBottomBtnAreaHeight
=
50
*
nScaleFactor
;
// height of the bottom area where the OK and Cancel buttons are.
const
long
nBtnWidth
=
90
*
nScaleFactor
;
const
long
nLabelHeight
=
getLabelFont
().
GetHeight
();
const
long
nBtnHeight
=
nLabelHeight
*
2
;
const
long
nBottomMargin
=
10
;
const
long
nMenuListMargin
=
5
;
const
long
nBtnHeight
=
nLabelHeight
*
2
;
const
long
nBottomMargin
=
10
*
nScaleFactor
;
const
long
nMenuListMargin
=
5
*
nScaleFactor
;
// parameters calculated from constants.
const
long
nListBoxWidth
=
maWndSize
.
Width
()
-
nListBoxMargin
*
2
;
...
...
@@ -949,7 +956,7 @@ void ScCheckListMenuWindow::getSectionPosSize(
break
;
case
BTN_SINGLE_SELECT
:
{
long
h
=
26
;
long
h
=
26
*
nScaleFactor
;
rPos
=
Point
(
nListBoxMargin
,
nSingleBtnAreaY
);
rPos
.
X
()
+=
nListBoxWidth
-
h
-
10
-
h
-
10
;
rPos
.
Y
()
+=
(
nSingleItemBtnAreaHeight
-
h
)
/
2
;
...
...
@@ -958,7 +965,7 @@ void ScCheckListMenuWindow::getSectionPosSize(
break
;
case
BTN_SINGLE_UNSELECT
:
{
long
h
=
26
;
long
h
=
26
*
nScaleFactor
;
rPos
=
Point
(
nListBoxMargin
,
nSingleBtnAreaY
);
rPos
.
X
()
+=
nListBoxWidth
-
h
-
10
;
rPos
.
Y
()
+=
(
nSingleItemBtnAreaHeight
-
h
)
/
2
;
...
...
@@ -1036,17 +1043,35 @@ void ScCheckListMenuWindow::packWindow()
maChkToggleAll
.
SetClickHdl
(
LINK
(
this
,
ScCheckListMenuWindow
,
TriStateHdl
)
);
maChkToggleAll
.
Show
();
sal_Int32
nScaleFactor
=
GetDPIScaleFactor
();
Image
aSingleSelect
(
ScResId
(
RID_IMG_SELECT_CURRENT
));
if
(
nScaleFactor
!=
1
)
{
BitmapEx
aBitmap
=
aSingleSelect
.
GetBitmapEx
();
aBitmap
.
Scale
(
nScaleFactor
,
nScaleFactor
,
BMP_SCALE_FAST
);
aSingleSelect
=
Image
(
aBitmap
);
}
getSectionPosSize
(
aPos
,
aSize
,
BTN_SINGLE_SELECT
);
maBtnSelectSingle
.
SetPosSizePixel
(
aPos
,
aSize
);
maBtnSelectSingle
.
SetQuickHelpText
(
SC_STRLOAD
(
RID_POPUP_FILTER
,
STR_BTN_SELECT_CURRENT
));
maBtnSelectSingle
.
SetModeImage
(
Image
(
ScResId
(
RID_IMG_SELECT_CURRENT
))
);
maBtnSelectSingle
.
SetModeImage
(
aSingleSelect
);
maBtnSelectSingle
.
SetClickHdl
(
LINK
(
this
,
ScCheckListMenuWindow
,
ButtonHdl
)
);
maBtnSelectSingle
.
Show
();
Image
aSingleUnselect
(
ScResId
(
RID_IMG_UNSELECT_CURRENT
));
if
(
nScaleFactor
!=
1
)
{
BitmapEx
aBitmap
=
aSingleUnselect
.
GetBitmapEx
();
aBitmap
.
Scale
(
nScaleFactor
,
nScaleFactor
,
BMP_SCALE_FAST
);
aSingleUnselect
=
Image
(
aBitmap
);
}
getSectionPosSize
(
aPos
,
aSize
,
BTN_SINGLE_UNSELECT
);
maBtnUnselectSingle
.
SetPosSizePixel
(
aPos
,
aSize
);
maBtnUnselectSingle
.
SetQuickHelpText
(
SC_STRLOAD
(
RID_POPUP_FILTER
,
STR_BTN_UNSELECT_CURRENT
));
maBtnUnselectSingle
.
SetModeImage
(
Image
(
ScResId
(
RID_IMG_UNSELECT_CURRENT
))
);
maBtnUnselectSingle
.
SetModeImage
(
aSingleUnselect
);
maBtnUnselectSingle
.
SetClickHdl
(
LINK
(
this
,
ScCheckListMenuWindow
,
ButtonHdl
)
);
maBtnUnselectSingle
.
Show
();
}
...
...
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