I'm using gtkdialog in shell script but I got stuck.I tried "use-markup" to format the font,however it appears does not work.Is not there anything like ?
And if the program has several widgets the layout always be disorderly...
Is there a solution?Or a good tutorial on gtkdialog?(I searched but could not find one besides the user-manual).
EDIT:I'm trying to change the font ,color it.The problem with desordely layout I've solved.
use-markup means that text will be styled using the Pango Text Attribute Markup Language. You'll have to markup your text accordingly to get the desired font/style/color/etc.
Related
I was writing my own text editor in Electron using React and I tried to do some basic syntax highlighting. The user writes their code inside a textarea, but there is no way to insert markup inside a textarea so I can't color text that way.
I found this jquery plugin which adds a backdrop behind the textarea so we can put a background color in certain places however I wanted the text themselves to be colored (which can't be done as the textarea is in front of the backdrop).
Any ideas about how other IDEs like Visual Studio Code (also written in electron) pulled this off?
There are multiple approaches that can work here.
One way could be using a div with a contenteditable="true" attribute instead of a textarea. This way you can both write text inside the element and style its contents. Of course this creates its own issues that would have to be dealt with - when to parse the code, how to reposition the caret and more. Depending on the approach, MutationObserver could come in handy.
Another way would be to not use any built-in writing functionalities at all and implement your own. Listen to keyboard events and programatically insert characters. In that case you would also need to implement your own caret, selection etc., which is not easy.
VS Code is open source, so you can actually take a look under the hood and see how the editor is made. They use a completely bespoke editor called Monaco but its source code is in the VS Code repo. This file is a good start.
I saw a recipe in here regarding the use of PIL/Pillow on Tkinter. The examples used were for labels.
I was wondering and would like to know if it can be done on a text widget so that we could use a external font instead of what is available in the user's machine.
EDIT 1: I seen a way to make it possible using this posted by Bryan Oakley regarding line numbers (although the project I'm working does not have line numbers) but I can't seem to get a grip on how to add the custom font code in the recipe
Question
Is it at all possible to change the color of the text highlight in Eclipse console to something more visible in Manjaro Linux? Your time and help are both much appreciated.
Important notes
I am using the default GTK theme. I do not want to use a different theme.
For testing, I have tried using a different theme, but that didn't help.
Problem
Currently, I am stuck with a barely visible light grey text selection in Eclipse console in the following two scenarios:
When manually selecting text
When using the Find\Replace... search function
Supporting screenshots
Manual mouse text selection:
Find/Replace... selection:
Looking into and changing these settings did not help:
I once ran into the same problem and used the gnome-color-chooser to resolve this issue.
You have to change property selected_bg_color value in your current GTK theme gtkrc file. I am using Ambiance theme.
So my setting are:
cat /usr/share/themes/Ambiance/gtk-2.0/gtkrc | more
gtk-color-scheme = "base_color:#ffffff\nfg_color:#4c4c4c\ntooltip_fg_color:#000000\nselected_bg_color:#f07746\nselected_fg_color:#FFFFFF\ntext_color:#3C3C3C\nbg_color:#F2F1F
0\ntooltip_bg_color:#f5f5c5\nlink_color:#DD4814"
Also refer these post which helps you in future for similar kinds of problems.
Change Eclipse sidebar vertical scope highlighting
eclipse-on-ubuntu-fixing-the-black-background-color-in-hover
How do you change the text within the extension library dialog box? No matter what I do, the text remains the same size. I can see the font change in the designer cleint but not in the browser. I tried looking at it with IE Developer Tools but I can't even see the text anywhere.
I have no idea what was going on yesterday but it just wasn't working. I was simply trying to set the text size of a computed field inside a dialog box. I changed the font size in the properties of the computed field and seems to work now, We have seen these issues on our dev server before.
I am not sure if you can change the text with text options but you can if you use HTML, and it should also work with CSS.
Standard <h1><h2><h... oh you get the idea works for me.
I've just started to develope an LWUIT MIDlet with standard LWUITTheme.res. I added 2 commands (Exit, Search) on my first form, but they appear with no style (black on white).
Instead, other 2 commands (Back, Details) on a second form, showed on Search command click, are rendered styled in white on blue, with a blue gradient background.
The first form has a BorderLayout, the second has no particular layout set.
Since I haven't changed commands style in my code, I would expect that their appearance be the same in the first as in the second form, and precisely as they appear in the second form.
Am I wrong?
Regards
--
After #Bhakki first reply, regarding SoftButtons, I've checked the {$LWUIT_FOLDER}/LWUITDemo/src/LWUITTheme.res file.
As you can see, both Command and SoftButton has in the .res file.
It seems that the commands in the first form are styled as Command, and those in the second form are styled as SoftButton.
But I added them in the same way in both forms.
Am I doing something wrong?
You created the first form before installing the theme. You need to install the LWUIT theme before you create components but after Display.init().