textfield strangeness

Hello all!
I’ve changed the background color and text color of a textfield in the inspector. Now long lines of text get cut off, and placing the cursor inside the textfield is problematic, as is selecting the text it contains. Also, clicking inside the textfield shows no blinking cursor, although you can actually type in it… Does just changing colors break a textfield to this extent? Seems rather weird.
I did try changing the colors in an “open” event, but I still get the same results.

Different topic, I know, but I also have similar issues with changing the color of a bevelbutton…if I do that, it becomes a flat image and nothing more. No “3D” click effect.
Anybody know if there’s a way around these issues?

What platform?

Sorry - missed that this was in the Linux target :S.

I have seen this. Be sure to add the modGTK3 module (pinned at the top of the target area) to your app.

Linux

[quote=427659:@Tim Jones]What platform?

Sorry - missed that this was in the Linux target :S.

I have seen this. Be sure to add the modGTK3 module (pinned at the top of the target area) to your app.[/quote]
I was afeared you were going to say that. It looks so simple on the surface, but last time I tried that, it said 2 things it was looking for didn’t exist. I’d have to try it again to see what those were exactly.

Ok, tried again. The debugger says these 2 things don’t exist:
modGTK3.initGtkEntryFix // adjusts the char-widths property of GtkEntry to be 0
modGTK3.initGtkWidgetHeightFix // adjusts all controls to be at least their minimum height

EDIT: I commented out those lines and it works for sizing. Thanks!
In the instructions, it says this : modGtk3.kGlobalGTK3CSS contains the default CSS override.
I must be blind, because I don’t see kGlobalGTK3CSS anywhere.

Thanks…I found what I needed. All good now. :slight_smile:

Actually, one more question. Since I can’t change the background color of a pushbutton, I have to use a bevelbutton (which, as I said, turns it into a flat image). I’ve managed to edit the css for “entry” which works on textfields, but I have no idea how to add the required lines for the bevelbutton.
The lines for button are:

sStylesCSS.Append("button, .button { min-height:16px; min-width:18px; }") sStylesCSS.Append("button, .button { padding:0px; padding-left: 4px; padding-right: 4px; margin:0px; }")
What do I need to change to have a copy of that point to a bevelbutton? (the CSS is no problem for me). I did try changing “button, .button” to “bevelbutton, .bevelbutton”, but that had no effect.

The BevelButton is a custom control, so there isn’t a direct correlation.

@Greg O’Lone - do you have the proper type info for how a BevelButton is built up on Linux?

Or, you can use gtkinspector to see what the control type is when you hover over a BevelButton in your app.

Also, if you do update the default CSS for a BB, please post your snippet so you can save others a bit of sleuthing down the line :smiley:

[quote=427671:@Tim Jones]The BevelButton is a custom control, so there isn’t a direct correlation.

@Greg O’Lone - do you have the proper type info for how a BevelButton is built up on Linux?

Or, you can use gtkinspector to see what the control type is when you hover over a BevelButton in your app.[/quote]
I wouldn’t know where to begin with either of those things. But if by some miracle I do get something figured out, you bet I’ll post back with info!

Nice for you. But it is more considerate and good forum etiquette to write the solution for others that might have the same problem.

Sorry, I assumed others would know. My bad.
To reiterate: “I must be blind, because I don’t see kGlobalGTK3CSS anywhere.” The instructions say to edit the CSS in kGlobalGTK3CSS, but whatever that is, it doesn’t seem to exist anywhere in the module.
The only thing I could find was in:
ModGTK3 / Methods / InitGlobalGTK3Style
I changed this line:

sStylesCSS.Append("entry, .entry  { padding:1px; padding-left: 5px; padding-right: 5px; margin:0px; }")

To this:

sStylesCSS.Append("entry, .entry  { padding:1px; padding-left: 5px; padding-right: 5px; margin:0px; background-color: #31363B; color: white; }")

That changed all the textfields to the colors I wanted, and didn’t cause the issue I was having where long text was being cut off (as I said in my initial post). It still doesn’t bring back the blinking cursor in textfields, but I can live with what I’ve got.

See? I know just enough to be dangerous. :wink: