GTK3 Theming modGTK3 Resolves layout corruption under ALL Linux Distros

Can you add the build automation item even if its empty to the repo ?
Otherwise you get an error opening the project

This is true but only at a limited extent.
One fact is partly not respecting the UI guidelines, which even Apple do sometimes. A completely different fact is having controls looking and behaving in a fully different way than the native ones. On Mac this is very noticeable, much more than on Windows where the UX fragmentation is much higher.
Every Mac user who used a Java or Qt made application can easily confirm this. Even the most naive user can tell you a such application “looks weird”.

And about modern apps I have the feeling the trend is now to have a better UX, as much as possible consistent with the native OS UX. The past years IMHO this was too often sacrificed on the altar of the cross platform development. The web also played a role on this, in a way.

So again, one of the strong pros of Xojo is the native UI, with all the limitations it brings, of course. One of the first arguments on pushing Xojo in companies is leveraging exactly the fact Xojo can do something no others can do, except the native development system, being it .NET or Cocoa. For Linux it’s a completely different story, due the fragmentation is stellar, so it’s basically not a problem for most Linux users.

electron based apps

Electron is the worst one, not only because of the UI/UX but also because it’s bloated.
But Qt applications, might be good in term of performance and everything else, just the UI is totally alien to a Mac user.

Take a look at Lazarus which uses the Free-Pascal compiler. Granted, it is open-source and as such many people have contributed to it throughout the years. It uses both Qt and GTK and offers a whole range of controls that look pretty native on the supported platforms. That in itself is not the problem. I guess it all depends on what the priorities are. For Xojo clearly the focus has been on improving the framework among other things. But I personally would like to see some expansion of its controls arsenal at some point.

There have been little hints over the past year or so is that after Web 2.0 there might be a number of new controls coming to desktop and by extension Linux. What that means we have zero idea. Almost makes me wonder if they plan on taking the Electron approach rather than native controls.

Xojo can’t (and shouldn’t) use QT because of their usurious license structure. In fact, it’s been such a turn off that the QT group has removed the license pricing from their website. You now have to provide contact info and get a quote by email.

Didnt Qt used to be about 5K per developer seat per year ?

It still is and more if you’re using ALL of the options.

[quote=445728:@Massimo Valle]Electron is the worst one, not only because of the UI/UX but also because it’s bloated.
But Qt applications, might be good in term of performance and everything else, just the UI is totally alien to a Mac user.[/quote]

I can’t believe that many popular apps are made around this bloatware of ****. It’s like the rebird of Macromedia/Adobe Flash but on Desktop with quadrupled impact. Twenty lines of your code sit on millions of lines of unkonwn, buggy, slow code. I am in favor of the idea that every developer writes in clear words for what purpose his code is meant for. Maybe this could have had saved the world from Electron? Imagine, in order to get this crap up and running all barrieres - normally preventing access to local ressources from the web - had to be removed or circumnavigated. That’s BS!

It’s there, it mostly works, the bulk of the heavy lifting is done, and it’s free. A sad commentary on one segment of the developer community, but most will take the easy path when it’s available.

Ok, I realise this is probably going to be a stupid question, but in trying to implement this I have crashed xojo 4-5 times and I am not arriving at a solution anywhere.

I downloaded the files from the bitbucket link, although I’m not quite sure what I was exactly supposed to download because I’m stupid. I’m seriously beginning to think I am the stupidest person on the planet because I just don’t get it.

From the top:

  • Add the modGtk3 module to your Xojo app.

What exactly is the “modGtk3 module”?

What I have done so far:

  • first off, I downloaded gtk3-style-controls.zip
  • I open the container and there is a folder of the same name
  • I open that folder and there is a project file, two images and a note.txt
  • I open the note.txt and it tells me to check the bitbucket
  • I go to the bitbucket and there is no “one” thing to download (well, not that I can see).
  • there is nothing named “module” in fact there are just heaps of codes, windows, projects and resources
  • there is a GTK3 folder, and it does have a modGTK3 FOLDER, but it also contains three further xojo_codes and not seeing any single “module” or download file, I figure I’m in the wrong area…
  • So lets look at what I originally had: the gtk3-style-controls.xojo_binary_project and it opens to a modGTK3 project but no amount of trying to copy this out is working. Exports, drag and drops, and it is in fact this step that I have managed to crash the app numerous times, as well as the whole computer once.
  • I tried saving as and I get a warning: Are you sure you want to change the saved project’s minimum IDE version? This is not reversible? I’ve tried yes and no.
  • I close that project again, because I feel that is the wrong path.
  • I realised there are two “window1” and open one of them, there is a “module”? under controls.
  • exporting this doesn’t work
  • if I right click and copy it (I feel like this is working)
  • and paste it under “controls” of another xojo project window I have open… it crashes again

I’m going to try again… I re-open it, and re-start creating a whole new project (I’ve been working with the demos and maybe that has been the issue??)

  • open xojo
  • new desktop project and call it test for company test
  • The project keeps dropping me back to the modgtk project window and my project isn’t there
  • close all windows and start again
  • new desktop, test for test and I have Module1my test project
  • file menu > import… and navigate to the modGTK3 files and folders, but the file dialog is empty, there’s nothing to import
  • “all files” is displayed in the combo at the bottom, but I am only seeing folder names, so this must also be the wrong way to do it
  • close out again, and I try drag and drop modGTK3.xojo_code directly into my project, that doesn’t work
  • I’m looking back at the binary project, there is a modGTK3 under controls, I cannot replicate this in any way. I can’t import, drag or drop, or manually create it in any way that I can see.
  • TRY right clicking it (modGTK3) in that project and as soon as I mouse into and click another window, xojo crashes.

My anxiety is through the roof, what am I missing? I don’t generally need people to hold my hand, and I realise I am not well versed in xojo terminology yet, but I just don’t understand what it is I am supposed to put where.

Sorry for my convoluted post but I’m at wits end :frowning:

I think it should be as simple as:

  • Download the repository
  • Open the modGtk3.xojo_project with the Xojo IDE
  • Select the Folder GTK3 (or just the Module modGtk3 in the folder) in the IDE
  • Menu Edit -> Copy
  • Open your own Xojo project (or create a new/empty desktop project)
  • Menu Edit -> Paste (now modGtk3 is available in your project)
  • Add the initialisation to App.Open:

modGTK3.initGtkEntryFix modGTK3.initGtkWidgetHeightFix modGTK3.InitGlobalGTK3Style

I loaded that on the MBP (OSX) without any issues… I said I wasn’t going to go back to this tonight… /he says as he goes back to “the office” :stuck_out_tongue:

[quote=495444:@Jürg Otter]I think it should be as simple as:
…[/quote]
Famous last words!!! :stuck_out_tongue:

But yes, this has worked. The list box isn’t right, but I will work out how to add that…

I feel like I did exctly that in amongst everything I tried, but, whatever…

IT WORKS!!!

You have NO idea the amount of angst that caused this afternoon!

Cheers!

You’re making it far more difficult than needed.

Add the modGTK class to the project at the top level

In the App.Open, add:

#If TargetLinux modGTK3.InitGlobalGTK3Style #endif

et vila!

(Apologies in advance, it’s late (or early) and I haven’t had much sleep and I had read and re-read dozens of times over the last few hours, I’m sorry if it appears disjointed and ill-thought-out, but trust me, it’s because it’s been thought out and played out a million times to me in the last 36 hours that is so disjointed, because it’s been constructed from hours and hours of trial and error and failure and frustration)

From your example:

[quote]- Add the “modGTK” class to the project (#1)

  • Add this code in the App.Open (#2)
    [/quote]
    What is the class? Where is it located? I even tried opening most of the files and searching for anything named “Class”
    From BitBucket READ ME:

[quote]- Add the modGtk3 module (#1) to(#2) your Xojo app.

  • In the open event of the app object, add the following lines-
    …[/quote]
    #1 using the word module in this case is confusing because (again) what is a module?
  • Is a module a file?
  • Folder?
  • Group of Files AND Folders?
  • is it the zip archive?
  • is it (from the Edit menu, 10th item down) the “Module” menu drop down?
  • is it (from the toolbar “Insert” toolbox drop down but not the blue cube with the plus sign, and NOT the word “Insert” but only the downward facing “disclosure” button)?
  • and because “module” is a term used in the IDE, that becomes especially unclear because nothing in the IDE that is called a module, is identifiable as being that one file or folder in the file manager
    #2 I chose to take the word “to” to imply “drag to”, given I didn’t know exactly how to “add” and there seemed to be so many ways (all involving numerous clicks, whilst drag and drop involves exactly one)

I do realise I am just not getting the terminology yet, but as someone who is new to the language and the IDE, it’s just not that simple or clear:

  • What is defined as a “Class” or module in xojo?
  • how is this identified as an external “entity” to be added?
  • and what is the action or method that is used to “add” it?

There exists two files in particular: a modGtk3.xojo_project and modGtk3.xojo_resources.

  • Dragging and dropping either of these files into the IDE results in something being added (important:if you “drag” it to the right part of the IDE, discussed further below, right at the end of this response), but neither are the right “action”, and
  • (right click) COPY (right click) PASTE, well, that doesn’t compute either, “where do you (right click) paste?”

What @Jürg has said is the most simple because it’s explicit and clear:

  • Take “this” (no terminology or reference to something that is unseen, explicitly says download, open with IDE, )
  • Put it here (even just the act of inserting it, isn’t clear*)

*Jürg’s description ‘Edit>Copy’ and ‘Edit>Paste’ was the most helpful, because it removed from the equation the action that was causing me the grief, the dragging and dropping of the files into the IDE, described below

Open the modGtk3.xojo_project with the Xojo IDE
Select the Folder GTK3 (or just the Module modGtk3 in the folder) in the IDE

  • Menu Edit → Copy
  • Open your own Xojo project (or create a new/empty desktop project)
  • Menu Edit → Paste (now modGtk3 is available in your project)
  • Those four lines are incredibly excplicit and descriptive of what to do, where and how. Because even as I write this I am trying these other options and none of these work (again, check below):
    After opening a new (or existing) project, where a GUI of Window1 appears (this is the default opening screen of the IDE):
  • dragging modGTK3.xojo code into the IDE and dropping it on the GUI Designer or in the left side panel does nothing
  • dragging modGTK3 folder into the IDE or side panel does nothing (see below)
  • in the root folder there are a lot of files, plus a single folder, dragging any of them into the IDE anywhere does nothing
  • (but just now for the first time, I deselected Window1 and selected App and I find now I can drop any

I’m leaving this next section in because although I feel it is accurate, again, it misses the “drag and drop” issue discussed below:

THIS is the “BELOW” I keep referring to
**WELL I’LL BE DAMNED! EVERYTIME I went back to the file browser and tried something, it would be different, and I’m absolutely gobsmacked at this, because this one fact alone has caused at least part of the grief.
The way/direction of my work flow has meant that I MOSTLY or USUALLY drag a file or folder from the file manager window across the edge of it into the main body area of the GUI, (because my windows overlap) at this point nothing is droppable, and if I continue to drag into the side panel, it’s still not droppable.
IF HOWEVER I drag it AROUND that main body area of the IDE and into the side bar (which, due to the positioning of my windows, is counter to how I would normally move the mouse in my workspace) IT WORKS.

my guess is it is to do with the “drag and drop” action set as an OS/System Message handlers between window objects and whether drag and drop should or shouldn’t do anything, and what is selected at the time of the action (files, text, objects, etc) and what the IDE expects as coming from the previous hwnd object. I’m guessing drag and drop over that boundary doesn’t include files from external to the window, butit does over other boundaries from outside the hwnd??

But this, as always drags me back to: which file/folder am I supposed to drag in?

Anyway, point is, I learned a lot from this one simple exercise (I have spent several hours just on this response, and not because I’m angry or anything, it’s purely because it’s how I perceive the world, I have an unnatural ability to be able to break anything, and I’ve learned from experience).

Lesson learned:

  • Grab the whole repo
  • locate modGtk3.xojo_project
  • open it in it’s own xojo IDE
  • copy GTK3 (blue folder) from the first IDE using the edit menu
  • paste it into the second IDE using the edit menu
  • add code to the app.open event handler

[quote=495482:@Tim Jones]You’re making it far more difficult than needed.

Add the modGTK class to the project at the top level

In the App.Open, add:

#If TargetLinux modGTK3.InitGlobalGTK3Style #endif

et vóila![/quote]

[h]Like this: [/h]

Hmm, I see that I have a Module (not a folder) named modGTK3, which contains some classes (those three you have in your folder), some constants, some methods, some Notes, and some properties. So I suspect you don’t have everything you need. Look in what you downloaded for a Module, which looks like a little Earth, called ModGTK3. Replace the folder with it.

It won’t appear as a file or folder in the file manager; it’ll be inside a project. Click in the IDE’s title bar where it says "Library. That brings up the Library Pane. Now scroll down to where it says “Project Items” in the Library pane. Hover the mouse over the little Earth. That is a Module, a prototype module for you to start putting your own stuff in, as and when.

So as I said in the other post, look in the modGTK3 distribution and find a Module in a project, a module called modGTK3. That is the module to drag/drop or copy/paste into the left-most side-bar, the navigation pane in your project. You drag/drop it from one project’s navigation pane to the other’s navigation pane.

Edit: Once you’re at the Bitbucket site as indicated in that note, click on Downloads in the left-hand column. At Downloads, click on Download Repository. You’ll get a pidog-blah-blah.zip, unzip, open the folder and ignore everything EXCEPT the modGtk3.xojo_project, which you open in the IDE You’ll see the modGTK3 Folder (OK, yes, that is a folder), but inside it is the MODULE you want.