From 07f4f0a10a7a508f97cfd59664a72082761f418e Mon Sep 17 00:00:00 2001 From: Vladislav Nepogodin Date: Sun, 9 Jul 2023 21:18:13 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20enable=20fixed=20size=20wrapping?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/application_browser.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/application_browser.rs b/src/application_browser.rs index f3b6c5f..6408382 100644 --- a/src/application_browser.rs +++ b/src/application_browser.rs @@ -3,9 +3,10 @@ use crate::utils; use gio::prelude::*; use gtk::prelude::{ - BoxExt, ButtonExt, CellRendererExt, CellRendererToggleExt, ComboBoxExt, ContainerExt, GridExt, - GtkListStoreExt, GtkListStoreExtManual, ScrolledWindowExt, ToggleButtonExt, TreeModelExt, - TreeStoreExt, TreeStoreExtManual, TreeViewColumnExt, TreeViewExt, WidgetExt, + BoxExt, ButtonExt, CellRendererExt, CellRendererTextExt, CellRendererToggleExt, ComboBoxExt, + ContainerExt, GridExt, GtkListStoreExt, GtkListStoreExtManual, ScrolledWindowExt, + ToggleButtonExt, TreeModelExt, TreeStoreExt, TreeStoreExtManual, TreeViewColumnExt, + TreeViewExt, WidgetExt, }; use once_cell::sync::Lazy; @@ -260,8 +261,10 @@ impl ApplicationBrowser { // column model: description column let desc_renderer = gtk::CellRendererText::new(); + desc_renderer.set_wrap_mode(gtk::pango::WrapMode::Word); + desc_renderer.set_wrap_width(290); let desc_column = create_column("Description", &desc_renderer, "text", DESCRIPTION); - desc_column.set_resizable(true); + desc_column.set_resizable(false); self.tree_view.append_column(&desc_column); // column model: install column