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
9bc6cb2b
Kaydet (Commit)
9bc6cb2b
authored
May 19, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
gtk3: nwf for progress bars
Change-Id: If45020ba9916f9df9b602f57c443f828c8d1de1a
üst
ae451af8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
2 deletions
+36
-2
gtkgdi.hxx
vcl/inc/unx/gtk/gtkgdi.hxx
+1
-0
gtk3salnativewidgets-gtk.cxx
vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+35
-2
No files found.
vcl/inc/unx/gtk/gtkgdi.hxx
Dosyayı görüntüle @
9bc6cb2b
...
@@ -89,6 +89,7 @@ private:
...
@@ -89,6 +89,7 @@ private:
static
GtkStyleContext
*
mpFixedHoriLineStyle
;
static
GtkStyleContext
*
mpFixedHoriLineStyle
;
static
GtkStyleContext
*
mpFixedVertLineStyle
;
static
GtkStyleContext
*
mpFixedVertLineStyle
;
static
GtkStyleContext
*
mpTreeHeaderButtonStyle
;
static
GtkStyleContext
*
mpTreeHeaderButtonStyle
;
static
GtkStyleContext
*
mpProgressBarStyle
;
static
Rectangle
NWGetScrollButtonRect
(
ControlPart
nPart
,
Rectangle
aAreaRect
);
static
Rectangle
NWGetScrollButtonRect
(
ControlPart
nPart
,
Rectangle
aAreaRect
);
static
Rectangle
NWGetSpinButtonRect
(
ControlPart
nPart
,
Rectangle
aAreaRect
);
static
Rectangle
NWGetSpinButtonRect
(
ControlPart
nPart
,
Rectangle
aAreaRect
);
...
...
vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
Dosyayı görüntüle @
9bc6cb2b
...
@@ -45,6 +45,7 @@ GtkStyleContext* GtkSalGraphics::mpFrameOutStyle = NULL;
...
@@ -45,6 +45,7 @@ GtkStyleContext* GtkSalGraphics::mpFrameOutStyle = NULL;
GtkStyleContext
*
GtkSalGraphics
::
mpFixedHoriLineStyle
=
NULL
;
GtkStyleContext
*
GtkSalGraphics
::
mpFixedHoriLineStyle
=
NULL
;
GtkStyleContext
*
GtkSalGraphics
::
mpFixedVertLineStyle
=
NULL
;
GtkStyleContext
*
GtkSalGraphics
::
mpFixedVertLineStyle
=
NULL
;
GtkStyleContext
*
GtkSalGraphics
::
mpTreeHeaderButtonStyle
=
NULL
;
GtkStyleContext
*
GtkSalGraphics
::
mpTreeHeaderButtonStyle
=
NULL
;
GtkStyleContext
*
GtkSalGraphics
::
mpProgressBarStyle
=
NULL
;
bool
GtkSalGraphics
::
style_loaded
=
false
;
bool
GtkSalGraphics
::
style_loaded
=
false
;
/************************************************************************
/************************************************************************
...
@@ -90,7 +91,8 @@ enum {
...
@@ -90,7 +91,8 @@ enum {
RENDER_EXTENSION
=
12
,
RENDER_EXTENSION
=
12
,
RENDER_EXPANDER
=
13
,
RENDER_EXPANDER
=
13
,
RENDER_ICON
=
14
,
RENDER_ICON
=
14
,
RENDER_FOCUS
=
15
,
RENDER_PROGRESS
=
15
,
RENDER_FOCUS
=
16
,
};
};
static
void
NWCalcArrowRect
(
const
Rectangle
&
rButton
,
Rectangle
&
rArrow
)
static
void
NWCalcArrowRect
(
const
Rectangle
&
rButton
,
Rectangle
&
rArrow
)
...
@@ -1007,6 +1009,11 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
...
@@ -1007,6 +1009,11 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
styleClass
=
GTK_STYLE_CLASS_ARROW
;
styleClass
=
GTK_STYLE_CLASS_ARROW
;
}
}
break
;
break
;
case
CTRL_PROGRESS
:
context
=
mpProgressBarStyle
;
renderType
=
RENDER_PROGRESS
;
styleClass
=
GTK_STYLE_CLASS_TROUGH
;
break
;
default
:
default
:
return
false
;
return
false
;
}
}
...
@@ -1127,6 +1134,29 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
...
@@ -1127,6 +1134,29 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
break
;
break
;
}
}
case
RENDER_PROGRESS
:
{
gtk_render_background
(
context
,
cr
,
nX
,
nY
,
nWidth
,
nHeight
);
gtk_render_frame
(
context
,
cr
,
nX
,
nY
,
nWidth
,
nHeight
);
long
nProgressWidth
=
rValue
.
getNumericVal
();
if
(
nProgressWidth
)
{
GtkBorder
padding
;
gtk_style_context_get_padding
(
context
,
GTK_STATE_FLAG_NORMAL
,
&
padding
);
gtk_style_context_remove_class
(
context
,
GTK_STYLE_CLASS_TROUGH
);
gtk_style_context_add_class
(
context
,
GTK_STYLE_CLASS_PROGRESSBAR
);
gtk_style_context_add_class
(
context
,
GTK_STYLE_CLASS_PULSE
);
nX
+=
padding
.
left
;
nY
+=
padding
.
top
;
nHeight
-=
(
padding
.
top
+
padding
.
bottom
);
nProgressWidth
-=
(
padding
.
left
+
padding
.
right
);
gtk_render_background
(
context
,
cr
,
nX
,
nY
,
nProgressWidth
,
nHeight
);
gtk_render_frame
(
context
,
cr
,
nX
,
nY
,
nProgressWidth
,
nHeight
);
}
break
;
}
default
:
default
:
break
;
break
;
}
}
...
@@ -1726,7 +1756,7 @@ bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP
...
@@ -1726,7 +1756,7 @@ bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP
case
CTRL_PUSHBUTTON
:
case
CTRL_PUSHBUTTON
:
case
CTRL_RADIOBUTTON
:
case
CTRL_RADIOBUTTON
:
case
CTRL_CHECKBOX
:
case
CTRL_CHECKBOX
:
//
case CTRL_PROGRESS:
case
CTRL_PROGRESS
:
// case CTRL_LISTNODE:
// case CTRL_LISTNODE:
// case CTRL_LISTNET:
// case CTRL_LISTNET:
if
(
nPart
==
PART_ENTIRE_CONTROL
||
nPart
==
PART_FOCUS
)
if
(
nPart
==
PART_ENTIRE_CONTROL
||
nPart
==
PART_FOCUS
)
...
@@ -2033,6 +2063,9 @@ GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow )
...
@@ -2033,6 +2063,9 @@ GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow )
GtkWidget
*
pTreeHeaderCellWidget
=
gtk_tree_view_column_get_button
(
middleTreeViewColumn
);
GtkWidget
*
pTreeHeaderCellWidget
=
gtk_tree_view_column_get_button
(
middleTreeViewColumn
);
mpTreeHeaderButtonStyle
=
gtk_widget_get_style_context
(
pTreeHeaderCellWidget
);
mpTreeHeaderButtonStyle
=
gtk_widget_get_style_context
(
pTreeHeaderCellWidget
);
/* Progress Bar */
getStyleContext
(
&
mpProgressBarStyle
,
gtk_progress_bar_new
());
gtk_widget_show_all
(
gDumbContainer
);
gtk_widget_show_all
(
gDumbContainer
);
}
}
...
...
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