ea3ihi / DMRStation

A free and open source DMR network radio
GNU General Public License v2.0
17 stars 9 forks source link

Display TG name instead number on mian window #4

Open sp2ong opened 4 years ago

sp2ong commented 4 years ago

It will nice to have the display on Mina window TG Name instead TG Number if the name of talk group exist in file tgs.dat

ea3ihi commented 4 years ago

It seems like the fixed layout widget does not support background-color, here is the result of applying this css:

[image: image.png]

El dom., 17 may. 2020 a las 11:50, Waldek (notifications@github.com) escribió:

It will nice to have the display on Mina window TG Name instead TG Number if the name of talk group exist in file tgs.dat

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ea3ihi/DMRStation/issues/4, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN2RUIOVXO5YL7252ZYOAZLRR6XNVANCNFSM4NDJZQ6A .

sp2ong commented 4 years ago

David

If we add to

the name of widget like: mainW I suppose that we need add in main.c GtkWidget *mainW; and mainW = GTK_WIDGET(gtk_builder_get_object(builder, "mainW")); to use #mainw in styles.css to set background color ? In GTK3 exist function gtk_widget_override_background_color
ea3ihi commented 4 years ago

No, that is not needed at all. If you use glade you can see how styles are applied to the widgets

El 17 may 2020, a las 14:47, Waldek notifications@github.com escribió:

 David

If we add to

the name of widget like:

mainW

I suppose that we need add in main.c

GtkWidget *mainW;

and

mainW = GTK_WIDGET(gtk_builder_get_object(builder, "mainW"));

to use #mainw in styles.css to set background color ?

In GTK3 exist function gtk_widget_override_background_color

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

sp2ong commented 4 years ago

Ok, the main widow used GTKFixed and I found the information:

Some widgets don't have their own Gdk::Window. They draw on their parent container's window. Some of those widgets don't draw their background. E.g. Gtk::Label does not draw its background. Probably Gtk::Fixed is also one of the widgets that don't draw their background. There are (at least) two solutions:

  1. Change the background of Gtk::Fixed's parent container. If that's not suitable, perhaps too much background is changed, then
  2. Put the Gtk::Fixed in a Gtk::EventBox, and change the background color of the Gtk::EventBox.
ea3ihi commented 4 years ago

Look at the screen capture I sent, where the background color was applied to all objects, but it did bolt affect the fixed item. At least in glade, I did not compile and run the app

El 17 may 2020, a las 15:00, Waldek notifications@github.com escribió:

 Ok, the main widow used GTKFixed and I found the information:

Some widgets don't have their own Gdk::Window. They draw on their parent container's window. Some of those widgets don't draw their background. E.g. Gtk::Label does not draw its background. Probably Gtk::Fixed is also one of the widgets that don't draw their background. There are (at least) two solutions:

Change the background of Gtk::Fixed's parent container. If that's not suitable, perhaps too much background is changed, then Put the Gtk::Fixed in a Gtk::EventBox, and change the background color of the Gtk::EventBox. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

ea3ihi commented 4 years ago

Labelled as enhancement