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
aff76b56
Kaydet (Commit)
aff76b56
authored
Nis 28, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
gtk3: use native tab item size
Change-Id: Iaef296c44f866bbcbcd2f2148402aef217c81b2c
üst
a7d843b6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
6 deletions
+22
-6
gtkgdi.hxx
vcl/inc/unx/gtk/gtkgdi.hxx
+1
-0
tabctrl.cxx
vcl/source/control/tabctrl.cxx
+1
-1
gtk3salnativewidgets-gtk.cxx
vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+20
-5
No files found.
vcl/inc/unx/gtk/gtkgdi.hxx
Dosyayı görüntüle @
aff76b56
...
...
@@ -78,6 +78,7 @@ private:
static
GtkStyleContext
*
mpSpinStyle
;
static
GtkStyleContext
*
mpComboboxStyle
;
static
GtkStyleContext
*
mpListboxStyle
;
static
GtkStyleContext
*
mpNoteBookStyle
;
void
getStyleContext
(
GtkStyleContext
**
style
,
GtkWidget
*
widget
);
Rectangle
NWGetScrollButtonRect
(
ControlPart
nPart
,
Rectangle
aAreaRect
);
...
...
vcl/source/control/tabctrl.cxx
Dosyayı görüntüle @
aff76b56
...
...
@@ -239,7 +239,7 @@ Size TabControl::ImplGetItemSize( ImplTabItem* pItem, long nMaxWidth )
Rectangle
aCtrlRegion
(
Point
(
0
,
0
),
aSize
);
Rectangle
aBoundingRgn
,
aContentRgn
;
const
ImplControlValue
aControlValue
;
const
EditBoxValue
aControlValue
(
GetTextHeight
())
;
if
(
GetNativeControlRegion
(
CTRL_TAB_ITEM
,
PART_ENTIRE_CONTROL
,
aCtrlRegion
,
ControlState
::
ENABLED
,
aControlValue
,
OUString
(),
aBoundingRgn
,
aContentRgn
)
)
...
...
vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
Dosyayı görüntüle @
aff76b56
...
...
@@ -33,6 +33,7 @@ GtkStyleContext* GtkSalGraphics::mpMenuItemStyle = NULL;
GtkStyleContext
*
GtkSalGraphics
::
mpSpinStyle
=
NULL
;
GtkStyleContext
*
GtkSalGraphics
::
mpComboboxStyle
=
NULL
;
GtkStyleContext
*
GtkSalGraphics
::
mpListboxStyle
=
NULL
;
GtkStyleContext
*
GtkSalGraphics
::
mpNoteBookStyle
=
NULL
;
bool
GtkSalGraphics
::
style_loaded
=
false
;
/************************************************************************
...
...
@@ -993,7 +994,6 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
Rectangle
AdjustRectForTextBordersPadding
(
GtkStyleContext
*
pStyle
,
long
nTextHeight
,
const
Rectangle
&
rControlRegion
)
{
gtk_style_context_save
(
pStyle
);
gtk_style_context_add_class
(
pStyle
,
GTK_STYLE_CLASS_ENTRY
);
GtkBorder
border
;
gtk_style_context_get_border
(
pStyle
,
GTK_STATE_FLAG_NORMAL
,
&
border
);
...
...
@@ -1119,6 +1119,18 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
{
aEditRect
=
AdjustRectForTextBordersPadding
(
mpSpinStyle
,
rValue
.
getNumericVal
(),
rControlRegion
);
}
else
if
(
nType
==
CTRL_TAB_ITEM
&&
nPart
==
PART_ENTIRE_CONTROL
)
{
gtk_style_context_save
(
mpNoteBookStyle
);
gtk_style_context_add_region
(
mpNoteBookStyle
,
GTK_STYLE_REGION_TAB
,
GTK_REGION_ONLY
);
gtk_style_context_add_class
(
mpNoteBookStyle
,
GTK_STYLE_CLASS_TOP
);
aEditRect
=
AdjustRectForTextBordersPadding
(
mpSpinStyle
,
rValue
.
getNumericVal
(),
rControlRegion
);
gtk_style_context_restore
(
mpNoteBookStyle
);
}
else
{
return
false
;
...
...
@@ -1507,12 +1519,12 @@ bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP
// case CTRL_WINDOW_BACKGROUND:
// return true;
//
case CTRL_TAB_ITEM:
case
CTRL_TAB_ITEM
:
// case CTRL_TAB_PANE:
// case CTRL_TAB_BODY:
//
if(nPart==PART_ENTIRE_CONTROL || nPart==PART_TABS_DRAW_RTL)
//
return true;
//
break;
if
(
nPart
==
PART_ENTIRE_CONTROL
||
nPart
==
PART_TABS_DRAW_RTL
)
return
true
;
break
;
case
CTRL_LISTBOX
:
if
(
nPart
==
PART_ENTIRE_CONTROL
||
nPart
==
PART_WINDOW
||
nPart
==
HAS_BACKGROUND_TEXTURE
||
nPart
==
PART_BUTTON_DOWN
)
...
...
@@ -1690,6 +1702,9 @@ GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow )
/* Spinbutton */
getStyleContext
(
&
mpSpinStyle
,
gtk_spin_button_new
(
NULL
,
0
,
0
));
/* NoteBook */
getStyleContext
(
&
mpNoteBookStyle
,
gtk_notebook_new
());
/* Combobox */
mpComboboxStyle
=
gtk_style_context_new
();
PrepareComboboxStyle
(
mpComboboxStyle
,
true
);
...
...
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