Gtk theme in GTK# (Windows) - mono

I'm trying to change the theme in GTK# (OS: Windows, IDE: Xamarin). But I get next issues:
I was able to find only one theme which correctly render, it is "Orta". All was well, except for lags and freezes. Here is my code:
string Resource_File = "Orta\\gtk-2.0\\gtkrc";
Application.Init ();
Gtk.Rc.AddDefaultFile (Resource_File);
Gtk.Rc.Parse (Resource_File);
MainWindow win = new MainWindow ();
win.Show ();
Application.Run ();
When I changing the size of the Paned or clicking on button I get GUI freezes(I already asked about this). This problem occurs only when using this theme, with the other themes all works tolerably. I used the search and found a couple of opinions, about that this is due to the use of Cairo to render graphics (one of them).
if I try to use a different theme, a lot of GUI elements not correctly rendered in my GTK# application, but they are correctly render in the GTK Theme Selector. If the theme is displayed correctly in GTK Theme Selector, then I try to use the selected gtkrc file in my Gtk# app(as shown in Example with "Orta"), but almost always, most widgets are not displayed correctly(here is an example)
So I have a few questions:
How to choose a work theme?
How to set a theme for GTK# (Windows)?
What Gtk# open source application using the theme and how?
What other way to change the style of GUI in the GTK# app?
Why "Orta" theme freezes?
So I need any your help!
Thanks!

I know it's an old question, but I've been fighting with themes lately.
It turns out that when running a Gtk# app build with Xamarin, theme issues will appear because it seems that some "Windows-like" theme is forced into the code.
When running the application from Xamarin Studio, depending on the .Net framework (Microsoft .NET 4.5, Mono 3.3.0, Mono 4.0.1) the behaviour was different. And I had a warning with Mono 3.3.0, telling me the 'Xamarin' engine could not be found.
I ended up with the following code :
Application.Init ();
Gtk.Settings.Default.ThemeName = "Theme/gtk-2.0/gtkrc";
Gtk.Rc.Parse ("./Theme/gtk-2.0/gtkrc");
Where gtkrc is my theme. Without setting the default theme name, nothing worked correctly. I didn't go very far into customizing my theme, so I can't tell if it solves every theme issue.

Related

How do I use a custom theme with Runtime Theming in UI Kitten?

This is my first time posting on StackOverflow so apologies in advance :)
I am new to React Native and am following this guide for UI Kitten's Runtime Theming so I understand how it works: https://akveo.github.io/react-native-ui-kitten/docs/guides/runtime-theming#runtime-theming
I manually installed UI Kitten to a freshly created Expo app (blank, managed workflow) and have been following the guides with no issues. However, I am stuck on the "Runtime Theming" guide.
I do not understand why my custom theme is being overridden by the default themes of UI Kitten. I used the Eva Color Generator (https://colors.eva.design/) to create a custom theme and followed the "Branding" guide and it worked perfectly.
I haven't made any changes to the code from the guides. I am not sure where & what I need to change in order to get the app to use my custom theme.
Any help would be appreciated!

How to know when an input field is focused from a QML Webview in Qt5

I'm working on an UI in QML for an embedded linux (for now raspberry pi/raspbian, but the HW will change pretty soon). I'm using Qt 5.0.2
I integrated a QWebKit browser using the QML WebView.
I want to be able to know when an input field is focused, I found some solutions using JS (using addJavaScriptObject or evaluateJavaScript) but all of them are working for Qt4.7/4.8 and Qt5 seems to have drastically cut the number of usable methods for the QML WebView.
Do you know a way to get this information? can we do it directly in the QML files?
Thx,
Arthur

How to get text 'shadow' effect in Silverlight Toolkit themes to work in my project

I am using the jetpack theme in my silverlight project. Everything is picking up the styles except I do not get the subtle text shadow effect that is visible on all the controls on the jetpack demo page.
Here is a screenshot - my project on the left, the demo site on the right.
Is there anything I have to do to enable the effect?
You have to use the label control in the toolkit.
Do this:
xmlns:label="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input"
then this
<label:Label>Icon</label:Label>

Applying a Silverlight 4 Toolkit Theme to an Existing Business Application?

I have created a new Silverlight 4 solution using the Business Application template. The requirement is to style the application and not use the generic template theme. I have installed the Silverlight 4 toolkit and like the BureauBlue theme.
How do I apply the BureauBlue toolkit theme to the entire solution? That is, is there a way to apply the theme globally (similar to attaching a CSS file to an ASP.NET or HTML site) instead of applying the theme to each control?
Thanks,
Sid
I have not experimented with this using a site that runs off an application with many user controls, but this seemed to work for my entire application and may help you.
First you have to have the theme reference added (for example, System.Windows.Controls.Theming.BureauBlue.dll)
Then in your code you can add this line of code:
System.Windows.Controls.Theming.BureauBlueTheme.SetIsApplicationTheme(Application.Current, true);
This applies the theme to the current running application, and if the boolean value is false I believe it will remove the theme.

Themes in Adobe AIR

What is the best way to skin/theme an AIR application. For example, I want to use a dark/blackish theme instead (similar to Tour de Flex) instead of the default gray one.
The ScaleNine themes are a good place to start, find one that is sort of like what you want, plug it into your app, and gradually replace the colors, images, and controls with your own.
http://www.scalenine.com/
I'm only just getting started in AIR as well, but if you're using Flex check out the Flex in a Week video series. There are several videos that cover creating custom MXML components and item renderers, which effectively let you skin your application.
You can also use CSS to style your app.
First you need to set the system chrome property in the air application properties file to none.
<initialWindow>
...
<systemChrome>none</systemChrome>
...
</initialWindow>
If the main file in your air app is named Main.mxml, then your application properties files will be named Main-app.xml. This file is not hard to find, it should be in the same location as the Main.mxml file.
By setting this property to none you are saying that you do not wish your air app window to take the style of the OS windows in which the app is running.
Since this property is set to none, the chrome for the air app will have to come from your Main.mxml file, which should be a WindowedApplication
Use the titleBarBackgroundSkin attriubute of the WindowedApplication To set the skin for the air app. titleBarBackgroundSkin defaults to "mx.skins.halo.ApplicationTitleBarBackgroundSkin"