mse-org / mseide-msegui

MSEide is a Rapid Application Development IDE for platform independent rich GUI applications in the Pascal language. It comes with its own GUI toolkit called MSEgui. Binaries: https://github.com/mse-org/mseide-msegui/releases
GNU General Public License v2.0
119 stars 15 forks source link

Ugly buttons when I compile the IDE (Linux) #67

Closed rchastain closed 7 months ago

rchastain commented 7 months ago

Hello Fred and other!

I downloaded the latest state of the repository and compiled the IDE, under Linux with FPC 3.2.2.

The buttons of the main IDE window are not displayed correctly.

mseide-dev

Here is the script I used to compile:

fpc -omseide \
-Fu../../lib/common/* \
-Fu../../lib/common/kernel \
-Fi../../lib/common/kernel \
-Fu../../lib/common/kernel/linux \
-Fu../../lib/addon/* \
-Fi../../lib/addon/* \
-Xg -l -Mobjfpc -Sh -Fcutf8 -gl -O- mseide.pas \
&>> mseide5-build.log
fredvs commented 7 months ago

Hello Roland.

Are you talking about the buttons of the debugger, like in your picture?

If so, hum, well, indeed the picture are a few changed. This because the original images used bmo_colormask filter that is not compatible for MacOS and NetBSD. [EDIT] Wayland also cannot deal with graymask and colormask.

So I updated the original images and removed the colormask.

Did you prefer the originals (that, imho, are not wonderful) ?

If you dont like the new, I can deal with 2 pictures, one without colormask for MacOS and NetBSD and a other with colormask for Linux, FreeBSD, OpenBSD and Windows. (but it needs some work).

fredvs commented 7 months ago

Here are the original buttons with colormask:

button_mse

fredvs commented 7 months ago

And a other option is to use BGRABitmap for all bitmap things. In this case no problem with gray_mask or stretching who work perfectly on all MSEgui OSes (Linux-X11, Linux-XWayland, Windows, FreeBSD, NetBSD, OpenBSD, DragonFlyBSD and MacOs-XQuartz.)

But this is a other adventure.

fredvs commented 7 months ago

The icons of button are here: https://github.com/mse-org/mseide-msegui/tree/main/icons/buttons

You will see that each image has a equivalent without colormask ( with a "2" added for file name ) and this images were used instead of those with colormask.

I dont really understand how that gray/color_mask works, it seems to be a MSE exclusive feature.

Voilà j'ai tout dit!

rchastain commented 7 months ago

Thank you for the informations, Fred.

fredvs commented 7 months ago

OK, I have choose option with 2 image-lists: one with colormask, like the original and one without mask for NetBSD and Darwin.

At loading, for Linux, Windows, OpenBSD and FreeBSD the images-list with colormask enabled will be used. And for Darwin and NetBSD the images-list without mask.

You may test it with last commit: https://github.com/mse-org/mseide-msegui/commit/20c87e7b923850c1becba4eebf115b87d9699f16

graemeg commented 7 months ago

On the original message, it looks like the alpha-blending is disabled. Hence the harsh black shadows. I don't know what would cause that though. :thinking:

rchastain commented 7 months ago

OK, Fred. Problem solved here on Linux.

fredvs commented 7 months ago

On the original message, it looks like the alpha-blending is disabled. Hence the harsh black shadows. I don't know what would cause that though. 🤔

In the original message, the icons dont have the gray shadows, I have edited the original image-png with Gimp and removed the shadows and the option color_masked set to disable. This because on XWayland, NetBSD and Darwin-XQuartz, when the option color_masked is enabled, the image is not rendered. And disable the option color_masked gives a ugly black shadow.

button_mse_nomask

But it was sad for the others, Linux-X11, FreeBSD, OpenBSD and Windows who can deal with those masks. So now there are 2 images-lists, one with colormask enabled and with all the shadows and one with colormask disabled and without any shadows.

So thanks Roland to note it.

fredvs commented 7 months ago

And a other option is to use BGRABitmap for all bitmap things. In this case no problem with gray_mask or stretching who work perfectly on all MSEgui OSes (Linux-X11, Linux-XWayland, Windows, FreeBSD, NetBSD, OpenBSD, DragonFlyBSD and MacOs-XQuartz.)

But this is a other adventure.

Yes, BGRABitmap is the panacea, in the project StrumPract all images/bitmaps are rendered by BGRABitmap now. Perfect, even on XWayland, NetBSD and MasOS-XQuartz, all images are perfectly rendered, with stretching and without those mse-gray/color mask limitation. Many, many and re-many thanks to Johann ELSASS to make msegui compatible with that fantastic library.