How to change gtk-entry icon size? - gtk

Is there any way to change the icon size of an gtk_entry / gtk_spin_button.
Because of using a touchscreen, i need much bigger icons.
I tried to change the gtkrc from my custom theme and added:
gtk-icon-sizes = "gtk-spin-button=48,48:gtk-entry=48,48"
Sadly this has no effect on my spin-button.
Can anybody help me out?

Digging through the gtk-source code just found the Answer, lucky me :)
I added
gtk-icon-sizes = "gtk-menu=48,48"
in the gtkrc of my theme and it's finally resizes my icons in gtk-entry and gtk-spin-button.

Related

The Vscode size and its icons and text have been reduced, what should I do?

As you can see below, my program does not have its actual size and is very small. please guide me.
Be sure to confirm the answer that helped me.
]
Maybe you have zoomed? To reset the zoom level to default values use (Ctrl+Numpad0)
https://code.visualstudio.com/docs/editor/accessibility

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.

How to change text color in search bar in iOS 13?

I am just about to port my UIKit app to iOS 13 and got stuck when trying to change the text color in my search bar to look nice in dark mode. I have tried already all proposed solutions and code snippets here on stackoverflow.
Is it a bug in iOS 13 that changing the search bar text color (even by using the new attribute searchTextField) does not work yet? Or does anybody have a working example for iOS 13 to share?
Thank you very much!
I solved the problem by myself - sorry, was my fault :-)
I had the following line of code in AppDelegate which I had overseen:
UITextField.appearance(whenContainedInInstancesOf: [UISearchBar.self]).defaultTextAttributes = convertToNSAttributedStringKeyDictionary([NSAttributedString.Key.foregroundColor.rawValue: UIColor.black])
After changing the color to UIColor.label it works fine in light mode and dark mode :-)

Resize by default TinyMCE

I'm using TinyMCE for the first time, and I love it, but is a bit closed.
I'd like to get images resized by default, this is, when adding an image, put it by default on 300px width, for example (then the user can make it bigger or smaller dragging).
I don't know where to touch! Is there a command within the lists of images (the js you can attach to make TinyMCE show a list of images)? Or I have to hack css? Or I have to dive into TinyMCE code?
Thank you in advance
Marc
If you are OK with changing code files then proceed as follows
Open tiny_mce/plugins/advimage/js/image.js
Locate insertAndClose : function()
Insert after
var ed = tinyMCEPopup.editor, ......;
if(f.width.value == ""){
f.width.value = 300;
}
Hope it helps!
There are several options. I would go the css way. Check out the tinycme init configuration setting content_css. Using an additioanl own css file enables you to setthe width of images to 300px easily.

How to change icon at title bar in matlab?

I have created a MAT LAB GUI and i want to change the default icon at title bar to my customize icon. Kindly help regarding this issue.
By doing so you will violate the licence agreement which can be found in
..\MATLAB\<>\licence.txt
Practicaly possible: (But don't do it)
let's assume that the figure handle is hFigure, then:
javaFrame = get(hFigure,'JavaFrame');
iconFilePath = 'iconImage.jpg';
javaFrame.setFigureIcon(javax.swing.ImageIcon(iconFilePath));