mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-07-01 15:57:46 +02:00
Add ellipsis to labels in ComboRow
This commit is contained in:
parent
00ffb7faf9
commit
f7c95cd4a1
6 changed files with 32 additions and 6 deletions
|
@ -10,7 +10,7 @@ use glib::subclass::types::ObjectSubclassIsExt;
|
|||
use glib::{clone, Cast, Propagation};
|
||||
use gtk::{gio, StringObject};
|
||||
use ReSet_Lib::audio::audio::OutputStream;
|
||||
use crate::components::utils::createDropdownLabelFactory;
|
||||
use crate::components::utils::{createDropdownLabelFactory, setComboRowEllipsis};
|
||||
|
||||
use super::outputStreamEntryImpl;
|
||||
use super::sourceBox::SourceBox;
|
||||
|
@ -34,6 +34,7 @@ impl OutputStreamEntry {
|
|||
let name = stream.application_name.clone() + ": " + stream.name.as_str();
|
||||
imp.resetSourceSelection.set_title(name.as_str());
|
||||
imp.resetSourceSelection.set_factory(Some(&createDropdownLabelFactory()));
|
||||
setComboRowEllipsis(imp.resetSourceSelection.get());
|
||||
let volume = stream.volume.first().unwrap_or(&0_u32);
|
||||
let fraction = (*volume as f64 / 655.36).round();
|
||||
let percentage = (fraction).to_string() + "%";
|
||||
|
|
|
@ -22,7 +22,7 @@ use crate::components::base::utils::{
|
|||
};
|
||||
use crate::components::input::sourceBoxImpl;
|
||||
use crate::components::input::sourceEntry::set_source_volume;
|
||||
use crate::components::utils::createDropdownLabelFactory;
|
||||
use crate::components::utils::{createDropdownLabelFactory, setComboRowEllipsis};
|
||||
|
||||
use super::outputStreamEntry::OutputStreamEntry;
|
||||
use super::sourceEntry::{set_default_source, SourceEntry, toggle_source_mute};
|
||||
|
@ -65,6 +65,7 @@ impl SourceBox {
|
|||
selfImp.resetInputCardsBackButton.set_action_name(Some("navigation.pop"));
|
||||
|
||||
selfImp.resetSourceDropdown.set_factory(Some(&createDropdownLabelFactory()));
|
||||
setComboRowEllipsis(selfImp.resetSourceDropdown.get());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue