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
76c9d45c
Kaydet (Commit)
76c9d45c
authored
Tem 01, 2013
tarafından
Ivan Timofeev
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
gtk3: add indicator-spacing to size of checkbox/radiobutton
Change-Id: Ifea43607c8cd5a8047796b7d2efdf14289b029e2
üst
a201ae63
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
10 deletions
+29
-10
gtkgdi.hxx
vcl/inc/unx/gtk/gtkgdi.hxx
+4
-0
gtk3salnativewidgets-gtk.cxx
vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+25
-10
No files found.
vcl/inc/unx/gtk/gtkgdi.hxx
Dosyayı görüntüle @
76c9d45c
...
...
@@ -103,6 +103,10 @@ private:
ControlType
nType
,
ControlPart
nPart
,
const
ImplControlValue
&
aValue
);
void
PaintCheckOrRadio
(
GtkStyleContext
*
context
,
cairo_t
*
cr
,
const
Rectangle
&
rControlRectangle
,
ControlType
nType
);
static
bool
style_loaded
;
};
...
...
vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
Dosyayı görüntüle @
76c9d45c
...
...
@@ -751,6 +751,24 @@ void GtkSalGraphics::PaintCombobox( GtkStyleContext *context,
arrowRect
.
GetWidth
()
);
}
void
GtkSalGraphics
::
PaintCheckOrRadio
(
GtkStyleContext
*
context
,
cairo_t
*
cr
,
const
Rectangle
&
rControlRectangle
,
ControlType
nType
)
{
gint
x
,
y
,
indicator_size
;
gtk_style_context_get_style
(
mpCheckButtonStyle
,
"indicator-size"
,
&
indicator_size
,
NULL
);
x
=
(
rControlRectangle
.
GetWidth
()
-
indicator_size
)
/
2
;
y
=
(
rControlRectangle
.
GetHeight
()
-
indicator_size
)
/
2
;
if
(
nType
==
CTRL_CHECKBOX
)
gtk_render_check
(
context
,
cr
,
x
,
y
,
indicator_size
,
indicator_size
);
else
if
(
nType
==
CTRL_RADIOBUTTON
)
gtk_render_option
(
context
,
cr
,
x
,
y
,
indicator_size
,
indicator_size
);
}
sal_Bool
GtkSalGraphics
::
drawNativeControl
(
ControlType
nType
,
ControlPart
nPart
,
const
Rectangle
&
rControlRegion
,
ControlState
nState
,
const
ImplControlValue
&
aValue
,
const
OUString
&
)
...
...
@@ -891,14 +909,8 @@ sal_Bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart
rControlRegion
.
GetWidth
(),
rControlRegion
.
GetHeight
());
break
;
case
RENDER_CHECK
:
gtk_render_check
(
context
,
cr
,
0
,
0
,
rControlRegion
.
GetWidth
(),
rControlRegion
.
GetHeight
());
break
;
case
RENDER_RADIO
:
gtk_render_option
(
context
,
cr
,
0
,
0
,
rControlRegion
.
GetWidth
(),
rControlRegion
.
GetHeight
());
PaintCheckOrRadio
(
context
,
cr
,
rControlRegion
,
nType
);
break
;
case
RENDER_LINE
:
gtk_render_line
(
context
,
cr
,
...
...
@@ -982,18 +994,21 @@ sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart
{
/* TODO: all this funcions needs improvements */
Rectangle
aEditRect
=
rControlRegion
;
gint
indicator_size
,
point
;
gint
indicator_size
,
indicator_spacing
,
point
;
if
(((
nType
==
CTRL_CHECKBOX
)
||
(
nType
==
CTRL_RADIOBUTTON
))
&&
nPart
==
PART_ENTIRE_CONTROL
)
{
gtk_style_context_get_style
(
mpCheckButtonStyle
,
"indicator-size"
,
&
indicator_size
,
"indicator-spacing"
,
&
indicator_spacing
,
(
char
*
)
NULL
);
point
=
MAX
(
0
,
rControlRegion
.
GetHeight
()
-
indicator_size
);
gint
size
=
indicator_size
+
indicator_spacing
*
2
;
point
=
MAX
(
0
,
rControlRegion
.
GetHeight
()
-
size
);
aEditRect
=
Rectangle
(
Point
(
0
,
point
/
2
),
Size
(
indicator_size
,
indicator_
size
)
);
Size
(
size
,
size
)
);
}
else
if
(
nType
==
CTRL_MENU_POPUP
)
{
...
...
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