Commit 54a4b16e authored by John Stowers's avatar John Stowers

Ellipsize long strings

'Fixes' bug 649520
parent a70b006b
......@@ -28,7 +28,7 @@ class _TestInfoTweak(Tweak):
self.widget = build_label_beside_widget(
name,
Gtk.Button(name),
Gtk.Button(options.get("test_button_name",name)),
info=options.get("tweak_info"),
warning=options.get("tweak_warning"))
......@@ -68,6 +68,7 @@ group_name = "Test Settings"
TWEAKS = (
_TestTweak("foo bar", "does foo bar", group_name=group_name),
_TestTweak("foo baz", "does foo baz", group_name=group_name),
_TestInfoTweak("long string "*10, "long description "*10, test_button_name="short",group_name=group_name),
_TestInfoTweak("foo info", "info widget", tweak_info="Information", group_name=group_name),
_TestInfoTweak("foo warning", "info widget", tweak_warning="Warning", group_name=group_name),
_TestButtonTweak("Need Action", "foo bar", need_action=True, group_name=group_name),
......
......@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with gnome-tweak-tool. If not, see <http://www.gnu.org/licenses/>.
from gi.repository import Gtk, Gdk, Gio
from gi.repository import Gtk, Gdk, Gio, Pango
from gtweak.tweakmodel import Tweak
from gtweak.gsettings import GSettingsSetting
......@@ -42,6 +42,7 @@ def build_label_beside_widget(txt, *widget, **kwargs):
hbox.props.spacing = 4
lbl = Gtk.Label(txt)
lbl.props.ellipsize = Pango.EllipsizeMode.END
lbl.props.xalign = 0.0
hbox.pack_start(lbl, True, True, 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment