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
dcfddd3f
Kaydet (Commit)
dcfddd3f
authored
Eki 17, 2016
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
gtk3: split tabitem rendering to a standalone thing
Change-Id: I88cd8926b733717c9ea0ecf64a9882eaa777dcfe
üst
75c2ecc2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
26 deletions
+21
-26
gtk3salnativewidgets-gtk.cxx
vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+21
-26
No files found.
vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
Dosyayı görüntüle @
dcfddd3f
...
...
@@ -143,6 +143,7 @@ enum class RenderType {
Expander
,
Icon
,
Progress
,
TabItem
,
Focus
};
...
...
@@ -1576,18 +1577,16 @@ GtkStyleContext* GtkSalGraphics::createOldContext(GtkControlPart ePart)
GtkWidgetPath
*
path
=
gtk_widget_path_copy
(
gtk_style_context_get_path
(
mpNotebookHeaderTabsTabStyle
));
gtk_widget_path_append_type
(
path
,
GTK_TYPE_LABEL
);
gtk_widget_path_iter_add_class
(
path
,
-
1
,
GTK_STYLE_CLASS_LABEL
);
GtkStyleContext
*
pRet
=
makeContext
(
path
,
mpNotebookHeaderTabsTabStyle
);
gtk_style_context_add_class
(
pRet
,
"active-page"
);
return
pRet
;
gtk_widget_path_iter_add_class
(
path
,
-
1
,
"active-page"
);
return
makeContext
(
path
,
mpNotebookHeaderTabsTabStyle
);
}
case
GtkControlPart
:
:
NotebookHeaderTabsTabHoverLabel
:
{
GtkWidgetPath
*
path
=
gtk_widget_path_copy
(
gtk_style_context_get_path
(
mpNotebookHeaderTabsTabStyle
));
gtk_widget_path_append_type
(
path
,
GTK_TYPE_LABEL
);
gtk_widget_path_iter_add_class
(
path
,
-
1
,
GTK_STYLE_CLASS_LABEL
);
GtkStyleContext
*
pRet
=
makeContext
(
path
,
mpNotebookHeaderTabsTabStyle
);
gtk_style_context_add_class
(
pRet
,
"prelight-page"
);
return
pRet
;
gtk_widget_path_iter_add_class
(
path
,
-
1
,
"prelight-page"
);
return
makeContext
(
path
,
mpNotebookHeaderTabsTabStyle
);
}
case
GtkControlPart
:
:
FrameBorder
:
{
...
...
@@ -1939,6 +1938,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
context
=
mpNotebookHeaderTabsTabStyle
;
if
(
nState
&
ControlState
::
SELECTED
)
flags
=
(
GtkStateFlags
)
(
flags
|
ACTIVE_TAB
());
renderType
=
RenderType
::
TabItem
;
break
;
case
ControlType
:
:
WindowBackground
:
context
=
gtk_widget_get_style_context
(
mpWindow
);
...
...
@@ -2013,26 +2013,6 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
long
nHeight
=
rControlRegion
.
GetHeight
();
style_context_set_state
(
context
,
flags
);
if
(
nType
==
ControlType
::
TabItem
)
{
GtkBorder
margin
;
if
(
gtk_check_version
(
3
,
20
,
0
)
==
nullptr
)
{
gtk_style_context_get_margin
(
mpNotebookHeaderTabsTabStyle
,
gtk_style_context_get_state
(
mpNotebookHeaderTabsTabStyle
),
&
margin
);
}
else
{
gint
initial_gap
(
0
);
gtk_style_context_get_style
(
mpNotebookStyle
,
"initial-gap"
,
&
initial_gap
,
nullptr
);
margin
.
left
=
margin
.
right
=
initial_gap
/
2
;
}
nX
+=
margin
.
left
;
nWidth
-=
(
margin
.
left
+
margin
.
right
);
}
if
(
styleClass
)
{
...
...
@@ -2134,6 +2114,21 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
break
;
}
case
RenderType
:
:
TabItem
:
{
if
(
gtk_check_version
(
3
,
20
,
0
)
!=
nullptr
)
{
gint
initial_gap
(
0
);
gtk_style_context_get_style
(
mpNotebookStyle
,
"initial-gap"
,
&
initial_gap
,
nullptr
);
nX
+=
initial_gap
/
2
;
nWidth
-=
initial_gap
;
}
Rectangle
aRect
(
Point
(
nX
,
nY
),
Size
(
nWidth
,
nHeight
));
render_common
(
mpNotebookHeaderTabsTabStyle
,
cr
,
aRect
,
flags
);
}
default
:
break
;
}
...
...
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