FontColor-Property for disabled Buttons? - smartface.io

Is there a Property in Smartface to set the Font-color of a Text-Button when it is disabled? With the following code, I would expect the Font-Color of the button would be red, but it is white. Color only changes to red, if I do not disable the button.
Pages.Pg_Pass.btn_stamp_3.enabled = false;
Pages.Pg_Pass.btn_stamp_3.fillColor = "#00FFFF";
Pages.Pg_Pass.btn_stamp_3.fontColor = "#FF0000";

fontColor property should change regardless of the textButton's enabled property. I mean you should see the fontColor as red although enabled is set as true or false.
I think you are using an Android device. This is a known issue for Android and will be fixed soon.

Related

Custom Icon for Gnome Shell Extension in Top Panel not visible

I try to use a custom SVG for my GNOME shell extension as status icon in top panel. But the custom icon is never shown, just the widget's label text. And I find no error in log output.
When I try to set a build-in icon like "system-search-symbolic" it works, this icon is shown.
This is my code snippet (the SVG is in an "icons" directory of my extension: /home/myusername/.local/share/gnome-shell/extensions/my-widget#my-widgets/icons/timeclock-16x16.svg):
// ...
let widgetBoxLayout = new St.BoxLayout();
let iconPath = `${Me.path}/icons/timeclock-16x16.svg`;
// just for debug if path is correct
log(`${Me.metadata.name}: Icon path=${iconPath}`);
let gicon = Gio.icon_new_for_string(`${iconPath}`);
let icon = new St.Icon({ gicon: gicon, style_class: 'system-status-icon', icon_size: 16 });
// this works for build-in icon:
//let icon = new St.Icon({ icon_name: 'system-search-symbolic', style_class: 'system-status-icon'});
widgetBoxLayout.add(icon);
widgetBoxLayout.add(this.widgetText);
//...
Maybe it's a problem that there is an "#" char in icon path?
But why no error is logged?
What is the correct code to use a custom icon for status panel?
(I have GNOME Shell 3.30.2)
Oh no! This one of these "fight for weeks alone, finally ask the crowd, suddenly know the solution yourself" cases ...
The icon was actually visible but since I use a dark theme and the icon itself is also dark it was not "visible". I inverted the colors of this icon and now I can see the icon next to my text in top panel.
Now I have to find out which icon to use depending on user's theme, but the original issue is solved.
Maybe this answer helps other developer making same stupid error.
You need to use -symbolic icons to allow automatic theme aware re-colorization of the icons. Just change the file name of the icon to timeclock-symbolic.svg, at least this should be your first step if every other aspect is fine.

Custom Keyboard Apps (IQKeyboardManager & SwiftKey)

I have a user who has this problem in their IphoneX iOS 13.2, he has no "done" button to accept a comment because seems like he is using SwiftKey app for custom keyboards and in my testing IQKeyboardManager is doing good.
So SwiftKey app has a problem with IQKeyboardManager, the done button of the toolbar is not showing up and either the "dark theme" on the keyboard.
Any suggestions?
You can double check this on that instance.
IQKeyboardManager.shared.enable = true
IQKeyboardManager.shared.enableAutoToolbar = true
IQKeyboardManager.shared.overrideKeyboardAppearance = true
IQKeyboardManager.shared.keyboardAppearance = .dark

Change Background Color of button in OSX

I want to change the background color of a button in a dialog to red, if a specific option is enabled. I tried
run.backgroundColor = NSColor.red
but nothing happens. (run is the name of the button) There are similar questions, but no answers. And these questions are years old. I hope there is a simple solution, bc. this seems not an unusual approach. Again, it belongs to OSX (and SWIFT 3).
NSButton doesn't have a backgroundColor property, but it's CALayer does. So, to get the same effect you could do the following:
myButton.wantsLayer = true
myButton.layer?.backgroundColor = NSColor.red.cgColor

How do I change the color of GTK's "Dropdown"?

I am just trying to tweak my GTK Theme to have a dark background color and light foreground color for Menu, Panel, Menu Bar.
However, I have a problem with "Dropdowns" which has a dark background color, and a dark background!
It seems to be taking the background of the clearlooks-menu and foreground of the clearlooks-default which seems to be an incorrect combination. How do I correct this?
I have been checking the Wiki but it is a bit confusing.
This has to do with widget_class "*.<GtkComboBox>.<GtkCellView>"
In my case the below setting solved the issue:
widget_class "*.<GtkComboBox>.<GtkCellView>" style "clearlooks-text-is-fg-color-workaround"
style "clearlooks-menuitem-text-is-fg-color-workaround"
{
text[NORMAL] = "#ffffff"
text[PRELIGHT] = #selected_fg_color
text[SELECTED] = #selected_fg_color
text[ACTIVE] = #fg_color
text[INSENSITIVE] = darker (#bg_color)
}

Smartface Android Header Logo

Can I change this logo to show slider on android? I tried
this.actionbar.logo = "img_source";
in HeaderBar script page, but it didn't change.
Correct property is icon ;
this.actionBar.icon = 'img_source';
You can read more about actionBar from http://www.smartface.io/developer/guides/controls/actionbar/