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
59d9a39a
Kaydet (Commit)
59d9a39a
authored
Tem 31, 2012
tarafından
Noel Power
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Revert "fdo#51336 - change vcl checkbox no-label behaviour"
This reverts commit
a1345cd9
.
üst
e3c2e0fa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
44 deletions
+13
-44
ebbcontrols.cxx
svtools/source/brwbox/ebbcontrols.cxx
+1
-23
button.hxx
vcl/inc/vcl/button.hxx
+6
-9
button.cxx
vcl/source/control/button.cxx
+6
-12
No files found.
svtools/source/brwbox/ebbcontrols.cxx
Dosyayı görüntüle @
59d9a39a
...
...
@@ -253,28 +253,6 @@ namespace svt
//= CheckBoxControl
//==================================================================
//------------------------------------------------------------------
class
CBCntrlTriState
:
public
TriStateBox
{
CBCntrlTriState
(
const
CBCntrlTriState
&
);
CBCntrlTriState
&
operator
=
(
const
CBCntrlTriState
&
);
protected
:
virtual
void
ImplHandleHoriAlign
(
const
Point
&
rPos
,
const
Size
&
rSize
,
const
Size
&
rImageSize
,
Rectangle
&
rStateRect
)
{
WinBits
nWinStyle
=
GetStyle
();
if
(
nWinStyle
&
WB_CENTER
)
rStateRect
.
Left
()
=
rPos
.
X
()
+
((
rSize
.
Width
()
-
rImageSize
.
Width
())
/
2
);
else
if
(
nWinStyle
&
WB_RIGHT
)
rStateRect
.
Left
()
=
rPos
.
X
()
+
rSize
.
Width
()
-
rImageSize
.
Width
();
else
rStateRect
.
Left
()
=
rPos
.
X
();
}
public
:
CBCntrlTriState
(
Window
*
pParent
,
WinBits
nStyle
=
0
)
:
TriStateBox
(
pParent
,
nStyle
)
{}
CBCntrlTriState
(
Window
*
pParent
,
const
ResId
&
rResId
)
:
TriStateBox
(
pParent
,
rResId
)
{}
};
CheckBoxControl
::
CheckBoxControl
(
Window
*
pParent
,
WinBits
nWinStyle
)
:
Control
(
pParent
,
nWinStyle
)
{
...
...
@@ -289,7 +267,7 @@ namespace svt
EnableChildTransparentMode
();
pBox
=
new
CBCntrlTriState
(
this
,
WB_CENTER
|
WB_VCENTER
);
pBox
=
new
TriStateBox
(
this
,
WB_CENTER
|
WB_VCENTER
);
pBox
->
EnableChildTransparentMode
();
pBox
->
SetPaintTransparent
(
sal_True
);
pBox
->
SetClickHdl
(
LINK
(
this
,
CheckBoxControl
,
OnClick
)
);
...
...
vcl/inc/vcl/button.hxx
Dosyayı görüntüle @
59d9a39a
...
...
@@ -406,6 +406,7 @@ public:
class
VCL_DLLPUBLIC
CheckBox
:
public
Button
{
private
:
Rectangle
maStateRect
;
Rectangle
maMouseRect
;
TriState
meState
;
...
...
@@ -424,7 +425,7 @@ class VCL_DLLPUBLIC CheckBox : public Button
SAL_DLLPRIVATE
void
ImplDrawCheckBox
(
bool
bLayout
=
false
);
SAL_DLLPRIVATE
long
ImplGetImageToTextDistance
()
const
;
SAL_DLLPRIVATE
Size
ImplGetCheckImageSize
()
const
;
private
:
// Copy assignment is forbidden and not implemented.
SAL_DLLPRIVATE
CheckBox
(
const
CheckBox
&
);
SAL_DLLPRIVATE
CheckBox
&
operator
=
(
const
CheckBox
&
);
...
...
@@ -432,19 +433,15 @@ private:
protected
:
using
Control
::
ImplInitSettings
;
using
Window
::
ImplInit
;
// allows the behaviour of horizontal placement of the checbox image to be
// overridden.
virtual
void
ImplHandleHoriAlign
(
const
Point
&
rPos
,
const
Size
&
rSize
,
const
Size
&
rImageSize
,
Rectangle
&
rStateRect
);
SAL_DLLPRIVATE
void
ImplInit
(
Window
*
pParent
,
WinBits
nStyle
);
SAL_DLLPRIVATE
void
ImplLoadRes
(
const
ResId
&
rResId
);
virtual
void
FillLayoutData
()
const
;
virtual
const
Font
&
SAL_DLLPRIVATE
virtual
void
FillLayoutData
()
const
;
SAL_DLLPRIVATE
virtual
const
Font
&
GetCanonicalFont
(
const
StyleSettings
&
_rStyle
)
const
;
virtual
const
Color
&
SAL_DLLPRIVATE
virtual
const
Color
&
GetCanonicalTextColor
(
const
StyleSettings
&
_rStyle
)
const
;
virtual
void
ImplDrawCheckBoxState
();
SAL_DLLPRIVATE
virtual
void
ImplDrawCheckBoxState
();
SAL_DLLPRIVATE
const
Rectangle
&
GetStateRect
()
const
{
return
maStateRect
;
}
SAL_DLLPRIVATE
const
Rectangle
&
GetMouseRect
()
const
{
return
maMouseRect
;
}
public
:
...
...
vcl/source/control/button.cxx
Dosyayı görüntüle @
59d9a39a
...
...
@@ -3261,9 +3261,12 @@ void CheckBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
}
else
{
// allow specific handling of WB_CENTER, WB_LEFT & WB_RIGHT by
// by subclasses
ImplHandleHoriAlign
(
rPos
,
rSize
,
rImageSize
,
rStateRect
);
if
(
nWinStyle
&
WB_CENTER
)
rStateRect
.
Left
()
=
rPos
.
X
()
+
((
rSize
.
Width
()
-
rImageSize
.
Width
())
/
2
);
else
if
(
nWinStyle
&
WB_RIGHT
)
rStateRect
.
Left
()
=
rPos
.
X
()
+
rSize
.
Width
()
-
rImageSize
.
Width
();
else
rStateRect
.
Left
()
=
rPos
.
X
();
if
(
nWinStyle
&
WB_VCENTER
)
rStateRect
.
Top
()
=
rPos
.
Y
()
+
((
rSize
.
Height
()
-
rImageSize
.
Height
())
/
2
);
else
if
(
nWinStyle
&
WB_BOTTOM
)
...
...
@@ -3305,15 +3308,6 @@ void CheckBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
// -----------------------------------------------------------------------
void
CheckBox
::
ImplHandleHoriAlign
(
const
Point
&
rPos
,
const
Size
&
/*rSize*/
,
const
Size
&
/*rImageSize*/
,
Rectangle
&
rStateRect
)
{
// align Checkbox image left ( always )
rStateRect
.
Left
()
=
rPos
.
X
();
}
// -----------------------------------------------------------------------
void
CheckBox
::
ImplDrawCheckBox
(
bool
bLayout
)
{
Size
aImageSize
=
ImplGetCheckImageSize
();
...
...
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