mirror of
https://github.com/GerbilSoft/rom-properties.git
synced 2025-06-18 19:45:41 -04:00
[gtk] RomDataView: Set RFT_STRING_warning_quark *before* calling set_label_format_type().
Otherwise, the description label won't get the "warning" formatting.
This commit is contained in:
parent
c17389f007
commit
15d7ae00eb
2
NEWS.md
2
NEWS.md
@ -60,6 +60,8 @@
|
|||||||
* Affects: v2.4 - v2.4.1
|
* Affects: v2.4 - v2.4.1
|
||||||
* Dreamcast: Fix typo that broke GDI parsing.
|
* Dreamcast: Fix typo that broke GDI parsing.
|
||||||
* Affects: V2.4 - v2.4.1
|
* Affects: V2.4 - v2.4.1
|
||||||
|
* GTK UI frontends: Ensure the description label is also bold+red if the
|
||||||
|
field is a "warning" field.
|
||||||
|
|
||||||
* Other changes:
|
* Other changes:
|
||||||
* CMake: Added an ENABLE_NETWORKING option to control whether or not
|
* CMake: Added an ENABLE_NETWORKING option to control whether or not
|
||||||
|
@ -1475,16 +1475,10 @@ rp_rom_data_view_update_display(RpRomDataView *page)
|
|||||||
// Add the widget to the table.
|
// Add the widget to the table.
|
||||||
auto &tab = tabs[tabIdx];
|
auto &tab = tabs[tabIdx];
|
||||||
|
|
||||||
// tr: Field description label.
|
// tr: Field description label
|
||||||
const string txt = fmt::format(FRUN(desc_label_fmt), field.name);
|
const string txt = fmt::format(FRUN(desc_label_fmt), field.name);
|
||||||
GtkWidget *const lblDesc = gtk_label_new(txt.c_str());
|
GtkWidget *const lblDesc = gtk_label_new(txt.c_str());
|
||||||
// NOTE: No name for this GtkWidget.
|
// NOTE: No name for this GtkWidget.
|
||||||
gtk_label_set_use_underline(GTK_LABEL(lblDesc), false);
|
|
||||||
set_label_format_type(page, GTK_LABEL(lblDesc));
|
|
||||||
page->cxx->vecDescLabels.push_back(GTK_LABEL(lblDesc));
|
|
||||||
#if !GTK_CHECK_VERSION(4, 0, 0)
|
|
||||||
gtk_widget_show(lblDesc);
|
|
||||||
#endif /* !GTK_CHECK_VERSION(4, 0, 0) */
|
|
||||||
|
|
||||||
// Check if this is an RFT_STRING with warning set.
|
// Check if this is an RFT_STRING with warning set.
|
||||||
// If it is, set the "RFT_STRING_warning" flag.
|
// If it is, set the "RFT_STRING_warning" flag.
|
||||||
@ -1492,7 +1486,14 @@ rp_rom_data_view_update_display(RpRomDataView *page)
|
|||||||
(field.flags & RomFields::STRF_WARNING));
|
(field.flags & RomFields::STRF_WARNING));
|
||||||
g_object_set_qdata(G_OBJECT(lblDesc), RFT_STRING_warning_quark, GUINT_TO_POINTER((guint)is_warning));
|
g_object_set_qdata(G_OBJECT(lblDesc), RFT_STRING_warning_quark, GUINT_TO_POINTER((guint)is_warning));
|
||||||
|
|
||||||
// Value widget.
|
gtk_label_set_use_underline(GTK_LABEL(lblDesc), false);
|
||||||
|
set_label_format_type(page, GTK_LABEL(lblDesc));
|
||||||
|
page->cxx->vecDescLabels.push_back(GTK_LABEL(lblDesc));
|
||||||
|
#if !GTK_CHECK_VERSION(4, 0, 0)
|
||||||
|
gtk_widget_show(lblDesc);
|
||||||
|
#endif /* !GTK_CHECK_VERSION(4, 0, 0) */
|
||||||
|
|
||||||
|
// Value widget
|
||||||
int &row = tabRowCount[tabIdx];
|
int &row = tabRowCount[tabIdx];
|
||||||
#if USE_GTK_GRID
|
#if USE_GTK_GRID
|
||||||
// TODO: GTK_FILL
|
// TODO: GTK_FILL
|
||||||
|
Loading…
Reference in New Issue
Block a user