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
8cd86d5e
Kaydet (Commit)
8cd86d5e
authored
Ock 13, 2015
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Scale the infobar controls correctly with DPI scale factor
Change-Id: I7d5b3daf4ae4da05bb7f09e80e790edae24e0eaf
üst
f78d0b2e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
9 deletions
+23
-9
infobar.cxx
sfx2/source/dialog/infobar.cxx
+23
-9
No files found.
sfx2/source/dialog/infobar.cxx
Dosyayı görüntüle @
8cd86d5e
...
...
@@ -99,6 +99,13 @@ namespace
}
}
namespace
{
const
long
INFO_BAR_BASE_HEIGHT
=
40
;
}
// anonymous namespace
SfxInfoBarWindow
::
SfxInfoBarWindow
(
vcl
::
Window
*
pParent
,
const
OUString
&
sId
,
const
OUString
&
sMessage
,
vector
<
PushButton
*>
aButtons
)
:
Window
(
pParent
,
0
),
...
...
@@ -107,8 +114,9 @@ SfxInfoBarWindow::SfxInfoBarWindow(vcl::Window* pParent, const OUString& sId,
m_pCloseBtn
(
new
SfxCloseButton
(
this
)),
m_aActionBtns
()
{
sal_Int32
nScaleFactor
=
GetDPIScaleFactor
();
long
nWidth
=
pParent
->
GetSizePixel
().
getWidth
();
SetPosSizePixel
(
Point
(
0
,
0
),
Size
(
nWidth
,
40
));
SetPosSizePixel
(
Point
(
0
,
0
),
Size
(
nWidth
,
INFO_BAR_BASE_HEIGHT
*
nScaleFactor
));
m_pMessage
->
SetText
(
sMessage
);
m_pMessage
->
SetBackground
(
Wallpaper
(
Color
(
255
,
255
,
191
)));
...
...
@@ -187,22 +195,28 @@ void SfxInfoBarWindow::Paint(const Rectangle& rPaintRect)
void
SfxInfoBarWindow
::
Resize
()
{
sal_Int32
nScaleFactor
=
GetDPIScaleFactor
();
long
nWidth
=
GetSizePixel
().
getWidth
();
m_pCloseBtn
->
SetPosSizePixel
(
Point
(
nWidth
-
25
,
15
),
Size
(
10
,
10
));
m_pCloseBtn
->
SetPosSizePixel
(
Point
(
nWidth
-
25
*
nScaleFactor
,
15
*
nScaleFactor
),
Size
(
10
*
nScaleFactor
,
10
*
nScaleFactor
));
// Reparent the buttons and place them on the right of the bar
long
nX
=
m_pCloseBtn
->
GetPosPixel
().
getX
()
-
15
;
long
nBtnGap
=
5
;
long
nX
=
m_pCloseBtn
->
GetPosPixel
().
getX
()
-
15
*
nScaleFactor
;
long
nButtonGap
=
5
*
nScaleFactor
;
boost
::
ptr_vector
<
PushButton
>::
iterator
it
;
for
(
it
=
m_aActionBtns
.
begin
();
it
!=
m_aActionBtns
.
end
();
++
it
)
{
long
nB
t
nWidth
=
it
->
GetSizePixel
().
getWidth
();
nX
-=
nB
t
nWidth
;
it
->
SetPosSizePixel
(
Point
(
nX
,
5
),
Size
(
nBtnWidth
,
30
));
nX
-=
nB
t
nGap
;
long
nB
utto
nWidth
=
it
->
GetSizePixel
().
getWidth
();
nX
-=
nB
utto
nWidth
;
it
->
SetPosSizePixel
(
Point
(
nX
,
5
*
nScaleFactor
),
Size
(
nButtonWidth
,
30
*
nScaleFactor
));
nX
-=
nB
utto
nGap
;
}
m_pMessage
->
SetPosSizePixel
(
Point
(
10
,
10
),
Size
(
nX
-
20
,
20
));
Point
aMessagePosition
(
10
*
nScaleFactor
,
10
*
nScaleFactor
);
Size
aMessageSize
(
nX
-
20
*
nScaleFactor
,
20
*
nScaleFactor
);
m_pMessage
->
SetPosSizePixel
(
aMessagePosition
,
aMessageSize
);
}
IMPL_LINK_NOARG
(
SfxInfoBarWindow
,
CloseHandler
)
...
...
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