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
aff83887
Kaydet (Commit)
aff83887
authored
Tem 17, 2013
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
allow radiobuttons and checkbox images to be aligned from .ui
Change-Id: Iee7b970344ac85e4b8ce51f1c3b5ae6605c05843
üst
f7024571
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
17 deletions
+49
-17
button.hxx
include/vcl/button.hxx
+1
-0
button.cxx
vcl/source/control/button.cxx
+44
-16
builder.cxx
vcl/source/window/builder.cxx
+4
-1
No files found.
include/vcl/button.hxx
Dosyayı görüntüle @
aff83887
...
...
@@ -86,6 +86,7 @@ public:
void
SetFocusRect
(
const
Rectangle
&
rFocusRect
);
bool
IsSmallSymbol
()
const
;
void
SetSmallSymbol
(
bool
bSmall
=
true
);
virtual
bool
set_property
(
const
OString
&
rKey
,
const
OString
&
rValue
);
};
// --------------------
...
...
vcl/source/control/button.cxx
Dosyayı görüntüle @
aff83887
...
...
@@ -605,6 +605,47 @@ bool Button::IsSmallSymbol () const
return
mpButtonData
->
mbSmallSymbol
;
}
bool
Button
::
set_property
(
const
OString
&
rKey
,
const
OString
&
rValue
)
{
if
(
rKey
==
"image-position"
)
{
ImageAlign
eAlign
=
IMAGEALIGN_LEFT
;
WinBits
nBits
=
GetStyle
();
if
(
rValue
==
"left"
)
{
nBits
&=
~
(
WB_CENTER
|
WB_RIGHT
);
nBits
|=
WB_LEFT
;
eAlign
=
IMAGEALIGN_LEFT
;
}
else
if
(
rValue
==
"right"
)
{
nBits
&=
~
(
WB_CENTER
|
WB_LEFT
);
nBits
|=
WB_RIGHT
;
eAlign
=
IMAGEALIGN_RIGHT
;
}
else
if
(
rValue
==
"top"
)
{
nBits
&=
~
(
WB_VCENTER
|
WB_BOTTOM
);
nBits
|=
WB_TOP
;
eAlign
=
IMAGEALIGN_TOP
;
}
else
if
(
rValue
==
"bottom"
)
{
nBits
&=
~
(
WB_VCENTER
|
WB_TOP
);
nBits
|=
WB_BOTTOM
;
eAlign
=
IMAGEALIGN_BOTTOM
;
}
SetImageAlign
(
eAlign
);
//Its rather mad to have to set these bits when there is the other
//image align. Looks like e.g. the radiobuttons etc weren't converted
//over to image align fully.
SetStyle
(
nBits
);
}
else
return
Control
::
set_property
(
rKey
,
rValue
);
return
true
;
}
// =======================================================================
void
PushButton
::
ImplInitPushButtonData
()
...
...
@@ -1720,21 +1761,8 @@ bool PushButton::set_property(const OString &rKey, const OString &rValue)
nBits
|=
WB_DEFBUTTON
;
SetStyle
(
nBits
);
}
else
if
(
rKey
==
"image-position"
)
{
ImageAlign
eAlign
=
IMAGEALIGN_LEFT
;
if
(
rValue
==
"left"
)
eAlign
=
IMAGEALIGN_LEFT
;
else
if
(
rValue
==
"right"
)
eAlign
=
IMAGEALIGN_RIGHT
;
else
if
(
rValue
==
"top"
)
eAlign
=
IMAGEALIGN_TOP
;
else
if
(
rValue
==
"bottom"
)
eAlign
=
IMAGEALIGN_BOTTOM
;
SetImageAlign
(
eAlign
);
}
else
return
Control
::
set_property
(
rKey
,
rValue
);
return
Button
::
set_property
(
rKey
,
rValue
);
return
true
;
}
...
...
@@ -2859,7 +2887,7 @@ bool RadioButton::set_property(const OString &rKey, const OString &rValue)
if
(
rKey
==
"active"
)
SetState
(
toBool
(
rValue
));
else
return
Window
::
set_property
(
rKey
,
rValue
);
return
Button
::
set_property
(
rKey
,
rValue
);
return
true
;
}
...
...
@@ -3805,7 +3833,7 @@ bool CheckBox::set_property(const OString &rKey, const OString &rValue)
if
(
rKey
==
"active"
)
SetState
(
toBool
(
rValue
)
?
STATE_CHECK
:
STATE_NOCHECK
);
else
return
Window
::
set_property
(
rKey
,
rValue
);
return
Button
::
set_property
(
rKey
,
rValue
);
return
true
;
}
...
...
vcl/source/window/builder.cxx
Dosyayı görüntüle @
aff83887
...
...
@@ -1138,7 +1138,9 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
OString
sWrap
=
extractCustomProperty
(
rMap
);
if
(
!
sWrap
.
isEmpty
())
nBits
|=
WB_WORDBREAK
;
pWindow
=
new
RadioButton
(
pParent
,
nBits
);
RadioButton
*
pButton
=
new
RadioButton
(
pParent
,
nBits
);
pButton
->
SetImageAlign
(
IMAGEALIGN_LEFT
);
//default to left
pWindow
=
pButton
;
}
else
if
(
name
==
"GtkCheckButton"
)
{
...
...
@@ -1153,6 +1155,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
new
CheckBox
(
pParent
,
nBits
);
if
(
bIsTriState
)
pCheckBox
->
SetState
(
STATE_DONTKNOW
);
pCheckBox
->
SetImageAlign
(
IMAGEALIGN_LEFT
);
//default to left
pWindow
=
pCheckBox
;
}
else
if
(
name
==
"GtkSpinButton"
)
...
...
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