[niepce] fwk/widget: make sure the metadata widget doesn't grow for long string
- From: Hubert Figuière <hub src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [niepce] fwk/widget: make sure the metadata widget doesn't grow for long string
- Date: Sun, 17 Feb 2019 15:14:37 +0000 (UTC)
commit faac54266bed925874eb50e5ec44009630c97e6d
Author: Hubert Figuière <hub figuiere net>
Date: Tue Jan 1 00:28:49 2019 -0500
fwk/widget: make sure the metadata widget doesn't grow for long string
- enable ellipsizing
src/fwk/toolkit/metadatawidget.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/fwk/toolkit/metadatawidget.cpp b/src/fwk/toolkit/metadatawidget.cpp
index b393914..81383a1 100644
--- a/src/fwk/toolkit/metadatawidget.cpp
+++ b/src/fwk/toolkit/metadatawidget.cpp
@@ -1,7 +1,7 @@
/*
* niepce - fwk/toolkit/metadatawidget.cpp
*
- * Copyright (C) 2008-2017 Hubert Figuiere
+ * Copyright (C) 2008-2019 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -98,6 +98,8 @@ MetaDataWidget::create_text_widget(bool readonly, uint32_t id)
Gtk::Label * l = Gtk::manage(new Gtk::Label());
l->set_xalign(0.0f);
l->set_yalign(0.5f);
+ // This will prevent the label from being expanded.
+ l->set_ellipsize(Pango::ELLIPSIZE_MIDDLE);
return l;
}
@@ -119,6 +121,8 @@ MetaDataWidget::create_string_widget(bool readonly, uint32_t id)
Gtk::Label * l = Gtk::manage(new Gtk::Label());
l->set_xalign(0.0f);
l->set_yalign(0.5f);
+ // This will prevent the label from being expanded.
+ l->set_ellipsize(Pango::ELLIPSIZE_MIDDLE);
return l;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]