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
8a172aef
Kaydet (Commit)
8a172aef
authored
Nis 29, 2011
tarafından
Christian Dywan
Kaydeden (comit)
Jan Holesovsky
Nis 29, 2011
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clean up GtkSettings use in GTK+ platform module
üst
51940f50
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
28 deletions
+11
-28
salnativewidgets-gtk.cxx
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+11
-28
No files found.
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
Dosyayı görüntüle @
8a172aef
...
@@ -3260,6 +3260,12 @@ void printStyleColors( GtkStyle* pStyle )
...
@@ -3260,6 +3260,12 @@ void printStyleColors( GtkStyle* pStyle )
void
GtkSalGraphics
::
updateSettings
(
AllSettings
&
rSettings
)
void
GtkSalGraphics
::
updateSettings
(
AllSettings
&
rSettings
)
{
{
GdkScreen
*
pScreen
=
gtk_widget_get_screen
(
m_pWindow
);
gtk_widget_ensure_style
(
m_pWindow
);
GtkStyle
*
pStyle
=
gtk_widget_get_style
(
m_pWindow
);
GtkSettings
*
pSettings
=
gtk_widget_get_settings
(
m_pWindow
);
StyleSettings
aStyleSet
=
rSettings
.
GetStyleSettings
();
// get the widgets in place
// get the widgets in place
NWEnsureGTKMenu
(
m_nScreen
);
NWEnsureGTKMenu
(
m_nScreen
);
NWEnsureGTKMenubar
(
m_nScreen
);
NWEnsureGTKMenubar
(
m_nScreen
);
...
@@ -3267,11 +3273,6 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
...
@@ -3267,11 +3273,6 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
NWEnsureGTKEditBox
(
m_nScreen
);
NWEnsureGTKEditBox
(
m_nScreen
);
NWEnsureGTKTooltip
(
m_nScreen
);
NWEnsureGTKTooltip
(
m_nScreen
);
gtk_widget_ensure_style
(
m_pWindow
);
GtkStyle
*
pStyle
=
gtk_widget_get_style
(
m_pWindow
);
StyleSettings
aStyleSet
=
rSettings
.
GetStyleSettings
();
#if OSL_DEBUG_LEVEL > 2
#if OSL_DEBUG_LEVEL > 2
printStyleColors
(
pStyle
);
printStyleColors
(
pStyle
);
#endif
#endif
...
@@ -3481,7 +3482,6 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
...
@@ -3481,7 +3482,6 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aStyleSet
.
SetFloatTitleFont
(
aFont
);
aStyleSet
.
SetFloatTitleFont
(
aFont
);
// get cursor blink time
// get cursor blink time
GtkSettings
*
pSettings
=
gtk_widget_get_settings
(
gWidgetData
[
m_nScreen
].
gEditBoxWidget
);
gboolean
blink
=
false
;
gboolean
blink
=
false
;
g_object_get
(
pSettings
,
"gtk-cursor-blink"
,
&
blink
,
(
char
*
)
NULL
);
g_object_get
(
pSettings
,
"gtk-cursor-blink"
,
&
blink
,
(
char
*
)
NULL
);
...
@@ -3498,7 +3498,6 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
...
@@ -3498,7 +3498,6 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aStyleSet
.
SetCursorBlinkTime
(
STYLE_CURSOR_NOBLINKTIME
);
aStyleSet
.
SetCursorBlinkTime
(
STYLE_CURSOR_NOBLINKTIME
);
gboolean
showmenuicons
=
true
;
gboolean
showmenuicons
=
true
;
pSettings
=
gtk_widget_get_settings
(
gWidgetData
[
m_nScreen
].
gImageMenuItem
);
g_object_get
(
pSettings
,
"gtk-menu-images"
,
&
showmenuicons
,
(
char
*
)
NULL
);
g_object_get
(
pSettings
,
"gtk-menu-images"
,
&
showmenuicons
,
(
char
*
)
NULL
);
aStyleSet
.
SetPreferredUseImagesInMenus
(
showmenuicons
);
aStyleSet
.
SetPreferredUseImagesInMenus
(
showmenuicons
);
...
@@ -3519,45 +3518,29 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
...
@@ -3519,45 +3518,29 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
// preferred icon style
// preferred icon style
gchar
*
pIconThemeName
=
NULL
;
gchar
*
pIconThemeName
=
NULL
;
g_object_get
(
gtk_settings_get_default
()
,
"gtk-icon-theme-name"
,
&
pIconThemeName
,
(
char
*
)
NULL
);
g_object_get
(
pSettings
,
"gtk-icon-theme-name"
,
&
pIconThemeName
,
(
char
*
)
NULL
);
aStyleSet
.
SetPreferredSymbolsStyleName
(
OUString
::
createFromAscii
(
pIconThemeName
)
);
aStyleSet
.
SetPreferredSymbolsStyleName
(
OUString
::
createFromAscii
(
pIconThemeName
)
);
g_free
(
pIconThemeName
);
g_free
(
pIconThemeName
);
aStyleSet
.
SetToolbarIconSize
(
STYLE_TOOLBAR_ICONSIZE_LARGE
);
aStyleSet
.
SetToolbarIconSize
(
STYLE_TOOLBAR_ICONSIZE_LARGE
);
const
cairo_font_options_t
*
pNewOptions
=
NULL
;
const
cairo_font_options_t
*
pNewOptions
=
NULL
;
if
(
GdkScreen
*
pScreen
=
gdk_display_get_screen
(
gdk_display_get_default
(),
m_nScreen
)
)
{
#if !GTK_CHECK_VERSION(2,9,0)
#if !GTK_CHECK_VERSION(2,9,0)
static
cairo_font_options_t
*
(
*
gdk_screen_get_font_options
)(
GdkScreen
*
)
=
static
cairo_font_options_t
*
(
*
gdk_screen_get_font_options
)(
GdkScreen
*
)
=
(
cairo_font_options_t
*
(
*
)(
GdkScreen
*
))
osl_getAsciiFunctionSymbol
(
GetSalData
()
->
m_pPlugin
,
"gdk_screen_get_font_options"
);
(
cairo_font_options_t
*
(
*
)(
GdkScreen
*
))
osl_getAsciiFunctionSymbol
(
GetSalData
()
->
m_pPlugin
,
"gdk_screen_get_font_options"
);
if
(
gdk_screen_get_font_options
!=
NULL
)
if
(
gdk_screen_get_font_options
!=
NULL
)
#endif
#endif
pNewOptions
=
gdk_screen_get_font_options
(
pScreen
);
pNewOptions
=
gdk_screen_get_font_options
(
pScreen
);
}
aStyleSet
.
SetCairoFontOptions
(
pNewOptions
);
aStyleSet
.
SetCairoFontOptions
(
pNewOptions
);
// finally update the collected settings
// finally update the collected settings
rSettings
.
SetStyleSettings
(
aStyleSet
);
rSettings
.
SetStyleSettings
(
aStyleSet
);
gchar
*
pThemeName
=
NULL
;
g_object_get
(
pSettings
,
"gtk-theme-name"
,
&
pThemeName
,
(
char
*
)
NULL
);
#if OSL_DEBUG_LEVEL > 1
#if OSL_DEBUG_LEVEL > 1
{
std
::
fprintf
(
stderr
,
"Theme name is
\"
%s
\"\n
"
,
pThemeName
);
GtkSettings
*
pGtkSettings
=
gtk_settings_get_default
();
GValue
aValue
;
memset
(
&
aValue
,
0
,
sizeof
(
GValue
)
);
g_value_init
(
&
aValue
,
G_TYPE_STRING
);
g_object_get_property
(
G_OBJECT
(
pGtkSettings
),
"gtk-theme-name"
,
&
aValue
);
const
gchar
*
pThemeName
=
g_value_get_string
(
&
aValue
);
std
::
fprintf
(
stderr
,
"Theme name is
\"
%s
\"\n
"
,
pThemeName
);
g_value_unset
(
&
aValue
);
}
#endif
#endif
GtkSettings
*
pGtkSettings
=
gtk_settings_get_default
();
GValue
aValue
;
memset
(
&
aValue
,
0
,
sizeof
(
GValue
)
);
g_value_init
(
&
aValue
,
G_TYPE_STRING
);
g_object_get_property
(
G_OBJECT
(
pGtkSettings
),
"gtk-theme-name"
,
&
aValue
);
const
gchar
*
pThemeName
=
g_value_get_string
(
&
aValue
);
// default behaviour
// default behaviour
bNeedPixmapPaint
=
bGlobalNeedPixmapPaint
;
bNeedPixmapPaint
=
bGlobalNeedPixmapPaint
;
...
@@ -3582,7 +3565,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
...
@@ -3582,7 +3565,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
}
}
}
}
// clean up
// clean up
g_
value_unset
(
&
aValue
);
g_
free
(
pThemeName
);
}
}
...
...
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