Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] Custom widget is not styled

Hehe I can try. I should dedicate time to setup the whole contribution environment. I will read about it.




On Thu, Sep 27, 2018 at 3:58 PM Lars Vogel <lars.vogel@xxxxxxxxxxx> wrote:
You are missing platform support. :-)

Let's fix this. Are you ready to contribute a Gerrit change to platform?

Cheers, Lars

Arián Fornaris Fernández <boniatillo@xxxxxxxxx> schrieb am Do., 27. Sep. 2018, 21:54:
 We could add a rule so that if the CSS class is set to "Composite" we style your widget as a Composite.

Yes, it is what I was trying to do in this way:

class MyCanvas extends Canvas {

MyCanvas() {
    setData("org.eclipse.e4.ui.css.CssClassName", "Canvas");
}

But it does not work. Maybe I am missing something.

Thanks
Arian



On Thu, Sep 27, 2018 at 3:49 PM Lars Vogel <lars.vogel@xxxxxxxxxxx> wrote:
Thanks Ariánfor the links.

Wrt your css question. Does CSS support "Use styling of X for Y". If yes we could/should also support this.

Forvyour use case: We could add a rule so that if the CSS class is set to "Composite" we style your widget as a Composite. That should allow  you to simply set the CSS class and to not care about additional CSS styling.

How does that sound?

Cheers, Lars

Arián Fornaris Fernández <boniatillo@xxxxxxxxx> schrieb am Do., 27. Sep. 2018, 21:42:
The docs here:


A popular tutorial:


I am developing v2, you can follow the progress here:


In relation to the article about theming. I see the solution is about to extends the Dark theme, but, what about any other theme that the user can install? If the user installs a pink theme with pink composites, how can I say that I want my custom composites to use the colors of the current theme, dedicated to composites? What I am doing is creating the "template" widget in a temporal shell, then I get the colors. But it is not a good solution because colors may change when a view is activated.





On Thu, Sep 27, 2018 at 3:28 PM Lars Vogel <lars.vogel@xxxxxxxxxxx> wrote:
Wooha that looks cool. Can you share some tutorial links? The menu on your website does not lead to getting started content as far as I can see.

Cheers, Lars

Arián Fornaris Fernández <boniatillo@xxxxxxxxx> schrieb am Do., 27. Sep. 2018, 21:24:
Hi Lars,

It is Phaser Editor: https://phasereditor2d.com/ An IDE to make HTML5 games. The operating system is Ubuntu (with Adwaita, you can see it in Adwaita dark here https://www.youtube.com/watch?v=bAvawP-ixJ4)

I am reading the article.

Thanks for the quick answer. 


On Thu, Sep 27, 2018 at 3:16 PM Lars Vogel <lars.vogel@xxxxxxxxxxx> wrote:
Hi Arián,

This looks very cool. Which app is this? Is it os?

To style your widget you have to add it to the dark theme.

YourWidget {
  Propertyyouwanttostyle: value;
}

And extend the default dark theme.


Does that help? If not please ask again.

Cheers, Lars



Arián Fornaris Fernández <boniatillo@xxxxxxxxx> schrieb am Do., 27. Sep. 2018, 21:10:
By the way, I do not want to create a new class or new CSS properties, I just want my custom widgets to get (inherit) the style from the base class (Canvas or Composite).

On Thu, Sep 27, 2018 at 3:00 PM Arián Fornaris Fernández <boniatillo@xxxxxxxxx> wrote:
Hi,

My custom widgets are not being styled by the CSS theme engine. Look in the image how my custom widgets look in the Dark theme.

The only thing I do is to extend the Canvas or Composite widgets.

I tried by calling this method:

setData("org.eclipse.e4.ui.css.CssClassName", "Canvas");

or

setData("org.eclipse.e4.ui.css.CssClassName", "Composite");

or

setData("org.eclipse.e4.ui.css.CssClassName", "Label");

But it does not work.

Any tip? This is really frustrating.

Best regards


image.png
_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/e4-dev
_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/e4-dev
_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/e4-dev
_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/e4-dev
_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/e4-dev
_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/e4-dev
_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/e4-dev
_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/e4-dev

Back to the top