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
9885a4f1
Kaydet (Commit)
9885a4f1
authored
Mar 09, 2016
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
gtk3: try and keep sync with yesterdays upstream scrollbar changes
Change-Id: If3942704602b82bc99ce49a230930ef59cc862da
üst
5f31291f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
5 deletions
+32
-5
gtkgdi.hxx
vcl/inc/unx/gtk/gtkgdi.hxx
+3
-0
gtk3salnativewidgets-gtk.cxx
vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+29
-5
No files found.
vcl/inc/unx/gtk/gtkgdi.hxx
Dosyayı görüntüle @
9885a4f1
...
...
@@ -47,6 +47,7 @@ enum class GtkControlPart
SpinButtonDownButton
,
ScrollbarVertical
,
ScrollbarHorizontal
,
ScrollbarContents
,
ScrollbarTrough
,
ScrollbarSlider
,
ScrollbarButton
,
...
...
@@ -105,10 +106,12 @@ private:
static
GtkStyleContext
*
mpEntryStyle
;
static
GtkStyleContext
*
mpTextViewStyle
;
static
GtkStyleContext
*
mpVScrollbarStyle
;
static
GtkStyleContext
*
mpVScrollbarContentsStyle
;
static
GtkStyleContext
*
mpVScrollbarTroughStyle
;
static
GtkStyleContext
*
mpVScrollbarSliderStyle
;
static
GtkStyleContext
*
mpVScrollbarButtonStyle
;
static
GtkStyleContext
*
mpHScrollbarStyle
;
static
GtkStyleContext
*
mpHScrollbarContentsStyle
;
static
GtkStyleContext
*
mpHScrollbarTroughStyle
;
static
GtkStyleContext
*
mpHScrollbarSliderStyle
;
static
GtkStyleContext
*
mpHScrollbarButtonStyle
;
...
...
vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
Dosyayı görüntüle @
9885a4f1
...
...
@@ -26,10 +26,12 @@ GtkStyleContext* GtkSalGraphics::mpLinkButtonStyle = nullptr;
GtkStyleContext
*
GtkSalGraphics
::
mpEntryStyle
=
nullptr
;
GtkStyleContext
*
GtkSalGraphics
::
mpTextViewStyle
=
nullptr
;
GtkStyleContext
*
GtkSalGraphics
::
mpVScrollbarStyle
=
nullptr
;
GtkStyleContext
*
GtkSalGraphics
::
mpVScrollbarContentsStyle
=
nullptr
;
GtkStyleContext
*
GtkSalGraphics
::
mpVScrollbarTroughStyle
=
nullptr
;
GtkStyleContext
*
GtkSalGraphics
::
mpVScrollbarSliderStyle
=
nullptr
;
GtkStyleContext
*
GtkSalGraphics
::
mpVScrollbarButtonStyle
=
nullptr
;
GtkStyleContext
*
GtkSalGraphics
::
mpHScrollbarStyle
=
nullptr
;
GtkStyleContext
*
GtkSalGraphics
::
mpHScrollbarContentsStyle
=
nullptr
;
GtkStyleContext
*
GtkSalGraphics
::
mpHScrollbarTroughStyle
=
nullptr
;
GtkStyleContext
*
GtkSalGraphics
::
mpHScrollbarSliderStyle
=
nullptr
;
GtkStyleContext
*
GtkSalGraphics
::
mpHScrollbarButtonStyle
=
nullptr
;
...
...
@@ -419,6 +421,14 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context,
bool
has_slider
=
(
thumbRect
.
GetWidth
()
>
0
&&
thumbRect
.
GetHeight
()
>
0
);
// ----------------- CONTENTS
GtkStyleContext
*
pScrollbarContentsStyle
=
scrollbarOrientation
==
GTK_ORIENTATION_VERTICAL
?
mpVScrollbarContentsStyle
:
mpHScrollbarContentsStyle
;
gtk_render_background
(
pScrollbarContentsStyle
,
cr
,
0
,
0
,
scrollbarRect
.
GetWidth
(),
scrollbarRect
.
GetHeight
()
);
gtk_render_frame
(
pScrollbarContentsStyle
,
cr
,
0
,
0
,
scrollbarRect
.
GetWidth
(),
scrollbarRect
.
GetHeight
()
);
// ----------------- TROUGH
GtkStyleContext
*
pScrollbarTroughStyle
=
scrollbarOrientation
==
GTK_ORIENTATION_VERTICAL
?
mpVScrollbarTroughStyle
:
mpHScrollbarTroughStyle
;
...
...
@@ -442,12 +452,15 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context,
GtkBorder
margin
;
gtk_style_context_get_margin
(
pScrollbarSliderStyle
,
stateFlags
,
&
margin
);
gtk_render_background
(
pScrollbarSliderStyle
,
cr
,
thumbRect
.
Left
()
+
margin
.
left
,
thumbRect
.
Top
()
+
margin
.
top
,
thumbRect
.
GetWidth
()
-
margin
.
left
-
margin
.
right
,
thumbRect
.
GetHeight
()
-
margin
.
top
-
margin
.
bottom
);
gtk_render_
slider
(
pScrollbarSliderStyle
,
cr
,
gtk_render_
frame
(
pScrollbarSliderStyle
,
cr
,
thumbRect
.
Left
()
+
margin
.
left
,
thumbRect
.
Top
()
+
margin
.
top
,
thumbRect
.
GetWidth
()
-
margin
.
left
-
margin
.
right
,
thumbRect
.
GetHeight
()
-
margin
.
top
-
margin
.
bottom
,
scrollbarOrientation
);
thumbRect
.
GetHeight
()
-
margin
.
top
-
margin
.
bottom
);
}
bool
backwardButtonInsensitive
=
...
...
@@ -894,6 +907,15 @@ static GtkStyleContext* createStyleContext(GtkControlPart ePart, GtkStyleContext
#endif
gtk_widget_path_iter_add_class
(
path
,
-
1
,
ePart
==
GtkControlPart
::
ScrollbarVertical
?
"vertical"
:
"horizontal"
);
break
;
case
GtkControlPart
:
:
ScrollbarContents
:
gtk_widget_path_append_type
(
path
,
GTK_TYPE_SCROLLBAR
);
#if GTK_CHECK_VERSION(3, 19, 2)
gtk_widget_path_iter_set_object_name
(
path
,
-
1
,
"contents"
);
#else
gtk_widget_path_iter_add_class
(
path
,
-
1
,
GTK_STYLE_CLASS_SCROLLBAR
);
gtk_widget_path_iter_add_class
(
path
,
-
1
,
GTK_STYLE_CLASS_CONTENTS
);
#endif
break
;
case
GtkControlPart
:
:
ScrollbarTrough
:
gtk_widget_path_append_type
(
path
,
GTK_TYPE_SCROLLBAR
);
#if GTK_CHECK_VERSION(3, 19, 2)
...
...
@@ -2346,11 +2368,13 @@ GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow )
mpToolButtonStyle
=
gtk_widget_get_style_context
(
GTK_WIDGET
(
pButton
));
mpVScrollbarStyle
=
createStyleContext
(
GtkControlPart
::
ScrollbarVertical
);
mpVScrollbarTroughStyle
=
createStyleContext
(
GtkControlPart
::
ScrollbarTrough
,
mpVScrollbarStyle
);
mpVScrollbarContentsStyle
=
createStyleContext
(
GtkControlPart
::
ScrollbarContents
,
mpVScrollbarStyle
);
mpVScrollbarTroughStyle
=
createStyleContext
(
GtkControlPart
::
ScrollbarTrough
,
mpVScrollbarContentsStyle
);
mpVScrollbarSliderStyle
=
createStyleContext
(
GtkControlPart
::
ScrollbarSlider
,
mpVScrollbarTroughStyle
);
mpVScrollbarButtonStyle
=
createStyleContext
(
GtkControlPart
::
ScrollbarButton
,
mpVScrollbarStyle
);
mpHScrollbarStyle
=
createStyleContext
(
GtkControlPart
::
ScrollbarHorizontal
);
mpHScrollbarTroughStyle
=
createStyleContext
(
GtkControlPart
::
ScrollbarTrough
,
mpHScrollbarStyle
);
mpHScrollbarContentsStyle
=
createStyleContext
(
GtkControlPart
::
ScrollbarContents
,
mpHScrollbarStyle
);
mpHScrollbarTroughStyle
=
createStyleContext
(
GtkControlPart
::
ScrollbarTrough
,
mpHScrollbarContentsStyle
);
mpHScrollbarSliderStyle
=
createStyleContext
(
GtkControlPart
::
ScrollbarSlider
,
mpHScrollbarTroughStyle
);
mpHScrollbarButtonStyle
=
createStyleContext
(
GtkControlPart
::
ScrollbarButton
,
mpHScrollbarStyle
);
...
...
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