Page 2 of 2

Re: Border problems

Posted: Saturday 27th February 2021 11:57am
by BruceSteers
Doctor Watson wrote: Saturday 27th February 2021 8:59am Indeed Steve. This code should simplify something I tried with a lot more coding.
But it doesn’t solve the problem regarding the border styles. Meanwhile I found that 3 more styles should be possible: Dashed, Dotted and Double.
And that brings me to the Themes. I have never used any, just satisfied with the ‘default’ one gets when installing Ubuntu, whatever it’s called.
I’m rather surprised to see that one would have to install a particular Ubuntu theme for Gambas controls to work / show properly.
That must have consequences for program developers.
Suppose I did install a theme such as Raleigh – where the borders show as they should – and I write this project I’m working on. When I run it, all looks like it should. Then I compile it into an executable and distribute it. But only users who have installed a compatible Theme would see it as it should …..
This looks like a clear bug to me. If my reasoning is right, it could even be that the Gambas developers were using such a Theme at the time they wrote the code.
I’m still hoping for a solution. It’s the Raised Border style I’m looking for in particular.
I wrote my program some years ago in RealBasic and it’s GUI just looked fine. If I have to settle for a meagre trick to produce something that looks like a border … it’s just feels not right, doesn't it?
What's clear is you are either new to linux and writing linux software and you do not really understand how it all works..
Some use different themes , some systems use QT only and not GTK, some GTK not QT
You say you do not use a theme , again this shows your knowledge of linux itself.
That's how linux works , just because you do not know you are using one does not mean you are not.
It's not a theme that just applies pictures. it controls many aspects of your desktop.
your reasoning actually, is not right at all. Sorry to say it.

you can use the utilities available and methods to make a GUI or not , if you want something special you have to code it.
I guess the basic app you wrote years ago was on a different linux, probably has a better theme installed.

I have complained and reported bugs about many gambas things on the gambas developers mailing lists and many were just my lack of knowledge about how the linux system works. (fair enough, i was happy be be informed the truth)

which brings me on to bugs..
This is not the gambas developers mailing list it is a support/gambas users forum.
The only person here that's written any code that's a part of gambas is me (as far as i i am aware) and I'm not part of the gambas team either i'm just a supporter. So this is not the place to report bugs, this is a place to get advice and help.

We can help you with your gambas programming code and help with things you do not understand about linux,
And let you know of the "tricks" and workarounds there are if you want something specific that gambas (and linux) do not do in general.

I hope that makes sense, sorry if it's not the answer you were looking for.

All the best
BruceS

Re: Border problems

Posted: Saturday 27th February 2021 2:59pm
by Doctor Watson
Could this be the reason why the borders don’t show as expected?
I usually close the Console at the bottom of Gambas but this time I forgot. When running my sample project, I spotted this :
Gtk-Message.png
Gtk-Message.png (13.04 KiB) Viewed 4182 times
Could that be the reason why the borders don’t show as expected?

If not, thanks for your example. I do want to learn this programming technique – still an amateur you know .
Unfortunately there seems to be something missing. When I try to run it, execution stops at 'Select Case iStyle' and gives an error : Unknown identifier : iStyle
Missing DIM ?

Re: Border problems

Posted: Saturday 27th February 2021 4:30pm
by stevedee
Doctor Watson wrote: Saturday 27th February 2021 2:59pm Could this be the reason why the borders don’t show as expected?
I usually close the Console at the bottom of Gambas but this time I forgot. When running my sample project, I spotted this :
Gtk-Message.png
Could that be the reason why the borders don’t show as expected?

If not, thanks for your example. I do want to learn this programming technique – still an amateur you know .
Unfortunately there seems to be something missing. When I try to run it, execution stops at 'Select Case iStyle' and gives an error : Unknown identifier : iStyle
Missing DIM ?
iStyle is declared in the Public Function line as the last item; iStyle As Integer)
so please recheck your code.

As for the error message, check to see if libcanberra-gtk-module is installed via Synaptic or whatever you use to install software.

But this probably won't fix the borders. If you open your file manager and look at how the controls appear, then change your desktop Theme, you will see that the controls change. Which proves its not a Gambas thing, but that Themes affect other programs too.

Re: Border problems

Posted: Saturday 27th February 2021 4:33pm
by BruceSteers
Doctor Watson wrote: Saturday 27th February 2021 2:59pm Could this be the reason why the borders don’t show as expected?
I usually close the Console at the bottom of Gambas but this time I forgot. When running my sample project, I spotted this :
Gtk-Message.png
Could that be the reason why the borders don’t show as expected?

If not, thanks for your example. I do want to learn this programming technique – still an amateur you know .
Unfortunately there seems to be something missing. When I try to run it, execution stops at 'Select Case iStyle' and gives an error : Unknown identifier : iStyle
Missing DIM ?
Missing or not defined in a Public space.
where do you define the iStyle variable in your source?
[EDIT] (sorry i missed that bit ;) )

Public Function BorderMe(thisControl As Control, thisPanel As Control, shadowColour As Integer, iStyle As Integer)

you must have not copy-n-pasted all of the line.


Those warning messages are coming from GTK not gambas but though your gambas app.
sometimes they are just unstoppable and they are harmless warnings, I would not pay them much attention.
although they can be clues to make your app work better sometimes.

BruceS

Re: Border problems

Posted: Saturday 27th February 2021 4:45pm
by BruceSteers
Go to your system settings and open the "Appearance" settings from "Look/Feel"

On the "Theme" page there is a button "Customize"
If you press that you can select different widget themes for Window and controls, etc.

THAT is how you get borders to show correctly.

Gambas cannot do it, gambas just makes use of either the GTK or QT controls (or widgets)

If you app ABSOLUTELY MUST have the borders as you want them you either have to make it yourself or advise the user in your readme of the widget themes to use for the best experience.

Some of the themes and controls are just not as well made as the others. (yes even the ones some linux systems use as defaults)

Live and learn though eh fella :)

It's not an ideal world but for free gambas is for sure one of the best and easiest IDE's to get your head around :)
slow steps though innit , don't run before you can walk as my mother used to say :)

And be happy with what you have got more than unhappy with all you've not got as there is more that you have not got than you have.
It's just a matter of focus.
(i just made that up)
:)

BruceS

Re: Border problems

Posted: Sunday 28th February 2021 10:19am
by Doctor Watson
Oh dear … I’ll need some time to digest the latest replies.
Steve : thanks for the update.
Bruce, you made me almost make dance for joy when I read
THAT is how you get borders to show correctly.
However …. :(
Go to your system settings and open the "Appearance" settings from "Look/Feel"
On the "Theme" page there is a button "Customize"
If you press that you can select different widget themes for Window and controls, etc.

I am running Ubuntu 20.04.2 LTS and there is no ‘Look/Feel’ option but ‘Appearance’ is.
When you open Appearance you get :
Settings.png
Settings.png (21.02 KiB) Viewed 4165 times
There is no ‘Customize’ button.
Back to square 1.
I just found this about Gnome Tweaks : https://linuxconfig.org/how-to-change-d ... ossa-linux.
Would / could that do the trick?
I’ve not installed it yet, but I have call it a day for now – other duties await.

Have a nice weekend

Re: Border problems

Posted: Sunday 28th February 2021 12:03pm
by BruceSteers
aah sorry I use MATE desktop and it seems the appearance setting is part of mate :(
.
Not sure how to do it on the less configurable desktops as i never use them.

what i use is part of mate-control-center
maybe install that?

Re: Border problems

Posted: Monday 1st March 2021 8:44am
by Doctor Watson
I just have installed Gnome Tweaks and it offers Appearance/Themes/Applications to choose any installed Theme.
I'm going to play around with the default themes, search for some new appropriate ones and see what their effect is with Borders.
There are already two that could qualify : HighContrast and HighContrastInverse. Raised borders for intance appear as they should
But I am also thinking of an additional possibility if it can be done at all, but that must be a topic for another post.
I’ll be back ASAP
Cheers!