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
994b9700
Kaydet (Commit)
994b9700
authored
May 14, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
gtk3: provide a scheme where NWF can render the focus rects itself
Change-Id: Ide68e35964670f7acf7a9098b2e04451a17e335a
üst
6cbdd2a1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
3 deletions
+38
-3
button.hxx
include/vcl/button.hxx
+1
-0
salnativewidgets.hxx
include/vcl/salnativewidgets.hxx
+3
-0
window.hxx
include/vcl/window.hxx
+1
-1
button.cxx
vcl/source/control/button.cxx
+14
-0
gtk3salnativewidgets-gtk.cxx
vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+19
-2
No files found.
include/vcl/button.hxx
Dosyayı görüntüle @
994b9700
...
@@ -203,6 +203,7 @@ public:
...
@@ -203,6 +203,7 @@ public:
void
SetToggleHdl
(
const
Link
<>&
rLink
)
{
maToggleHdl
=
rLink
;
}
void
SetToggleHdl
(
const
Link
<>&
rLink
)
{
maToggleHdl
=
rLink
;
}
const
Link
<>&
GetToggleHdl
()
const
{
return
maToggleHdl
;
}
const
Link
<>&
GetToggleHdl
()
const
{
return
maToggleHdl
;
}
virtual
bool
set_property
(
const
OString
&
rKey
,
const
OString
&
rValue
)
SAL_OVERRIDE
;
virtual
bool
set_property
(
const
OString
&
rKey
,
const
OString
&
rValue
)
SAL_OVERRIDE
;
virtual
void
ShowFocus
(
const
Rectangle
&
rRect
)
SAL_OVERRIDE
;
};
};
inline
void
PushButton
::
Check
(
bool
bCheck
)
inline
void
PushButton
::
Check
(
bool
bCheck
)
...
...
include/vcl/salnativewidgets.hxx
Dosyayı görüntüle @
994b9700
...
@@ -225,6 +225,9 @@ typedef sal_uInt32 ControlPart;
...
@@ -225,6 +225,9 @@ typedef sal_uInt32 ControlPart;
//to draw natively the border of frames
//to draw natively the border of frames
#define PART_BORDER 7000
#define PART_BORDER 7000
//to draw natively the focus rects
#define PART_FOCUS 8000
/* Control State:
/* Control State:
*
*
* Specify how a particular part of the control
* Specify how a particular part of the control
...
...
include/vcl/window.hxx
Dosyayı görüntüle @
994b9700
...
@@ -1100,7 +1100,7 @@ public:
...
@@ -1100,7 +1100,7 @@ public:
/// Add all children to @rAllChildren recursively.
/// Add all children to @rAllChildren recursively.
SAL_DLLPRIVATE
void
CollectChildren
(
::
std
::
vector
<
vcl
::
Window
*>&
rAllChildren
);
SAL_DLLPRIVATE
void
CollectChildren
(
::
std
::
vector
<
vcl
::
Window
*>&
rAllChildren
);
v
oid
ShowFocus
(
const
Rectangle
&
rRect
);
v
irtual
void
ShowFocus
(
const
Rectangle
&
rRect
);
void
HideFocus
();
void
HideFocus
();
void
Invert
(
const
Rectangle
&
rRect
,
sal_uInt16
nFlags
=
0
);
void
Invert
(
const
Rectangle
&
rRect
,
sal_uInt16
nFlags
=
0
);
...
...
vcl/source/control/button.cxx
Dosyayı görüntüle @
994b9700
...
@@ -1657,6 +1657,20 @@ bool PushButton::set_property(const OString &rKey, const OString &rValue)
...
@@ -1657,6 +1657,20 @@ bool PushButton::set_property(const OString &rKey, const OString &rValue)
return
true
;
return
true
;
}
}
void
PushButton
::
ShowFocus
(
const
Rectangle
&
rRect
)
{
bool
bNativeOK
;
if
((
bNativeOK
=
IsNativeControlSupported
(
CTRL_PUSHBUTTON
,
PART_FOCUS
)))
{
ImplControlValue
aControlValue
;
Rectangle
aInRect
(
Point
(),
GetOutputSizePixel
());
bNativeOK
=
GetOutDev
()
->
DrawNativeControl
(
CTRL_PUSHBUTTON
,
PART_FOCUS
,
aInRect
,
ControlState
::
FOCUSED
,
aControlValue
,
OUString
());
}
if
(
!
bNativeOK
)
Button
::
ShowFocus
(
rRect
);
}
void
OKButton
::
ImplInit
(
vcl
::
Window
*
pParent
,
WinBits
nStyle
)
void
OKButton
::
ImplInit
(
vcl
::
Window
*
pParent
,
WinBits
nStyle
)
{
{
PushButton
::
ImplInit
(
pParent
,
nStyle
);
PushButton
::
ImplInit
(
pParent
,
nStyle
);
...
...
vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
Dosyayı görüntüle @
994b9700
...
@@ -82,6 +82,7 @@ enum {
...
@@ -82,6 +82,7 @@ enum {
RENDER_SPINBUTTON
=
9
,
RENDER_SPINBUTTON
=
9
,
RENDER_COMBOBOX
=
10
,
RENDER_COMBOBOX
=
10
,
RENDER_EXTENSION
=
11
,
RENDER_EXTENSION
=
11
,
RENDER_FOCUS
=
12
,
};
};
static
void
NWCalcArrowRect
(
const
Rectangle
&
rButton
,
Rectangle
&
rArrow
)
static
void
NWCalcArrowRect
(
const
Rectangle
&
rButton
,
Rectangle
&
rArrow
)
...
@@ -801,7 +802,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
...
@@ -801,7 +802,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
{
{
GtkStateFlags
flags
;
GtkStateFlags
flags
;
GtkShadowType
shadow
;
GtkShadowType
shadow
;
gint
renderType
=
RENDER_BACKGROUND_AND_FRAME
;
gint
renderType
=
nPart
==
PART_FOCUS
?
RENDER_FOCUS
:
RENDER_BACKGROUND_AND_FRAME
;
GtkStyleContext
*
context
=
NULL
;
GtkStyleContext
*
context
=
NULL
;
const
gchar
*
styleClass
=
NULL
;
const
gchar
*
styleClass
=
NULL
;
...
@@ -1034,6 +1035,21 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
...
@@ -1034,6 +1035,21 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
case
RENDER_COMBOBOX
:
case
RENDER_COMBOBOX
:
PaintCombobox
(
flags
,
cr
,
rControlRegion
,
nType
,
nPart
,
rValue
);
PaintCombobox
(
flags
,
cr
,
rControlRegion
,
nType
,
nPart
,
rValue
);
break
;
break
;
case
RENDER_FOCUS
:
{
GtkBorder
border
;
gtk_style_context_get_border
(
context
,
flags
,
&
border
);
nX
+=
border
.
left
;
nY
+=
border
.
top
;
nWidth
-=
border
.
left
+
border
.
right
;
nHeight
-=
border
.
top
+
border
.
bottom
;
gtk_render_focus
(
context
,
cr
,
nX
,
nY
,
nWidth
,
nHeight
);
break
;
}
default
:
default
:
break
;
break
;
}
}
...
@@ -1626,7 +1642,7 @@ bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP
...
@@ -1626,7 +1642,7 @@ bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP
// case CTRL_PROGRESS:
// case CTRL_PROGRESS:
// case CTRL_LISTNODE:
// case CTRL_LISTNODE:
// case CTRL_LISTNET:
// case CTRL_LISTNET:
if
(
nPart
==
PART_ENTIRE_CONTROL
)
if
(
nPart
==
PART_ENTIRE_CONTROL
||
nPart
==
PART_FOCUS
)
return
true
;
return
true
;
break
;
break
;
...
@@ -1760,6 +1776,7 @@ void GtkData::initNWF()
...
@@ -1760,6 +1776,7 @@ void GtkData::initNWF()
pSVData
->
maNWFData
.
mbCheckBoxNeedsErase
=
true
;
pSVData
->
maNWFData
.
mbCheckBoxNeedsErase
=
true
;
pSVData
->
maNWFData
.
mbCanDrawWidgetAnySize
=
true
;
pSVData
->
maNWFData
.
mbCanDrawWidgetAnySize
=
true
;
pSVData
->
maNWFData
.
mbDDListBoxNoTextArea
=
true
;
pSVData
->
maNWFData
.
mbDDListBoxNoTextArea
=
true
;
pSVData
->
maNWFData
.
mbNoFocusRects
=
true
;
}
}
void
GtkData
::
deInitNWF
()
void
GtkData
::
deInitNWF
()
...
...
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