Film Simulation ComboBox for long HaldCLUT names (#6423)
* Film Simulation ComboBox for long HaldCLUT names Small change that makes the Film Simulation ComboBox look better if there are HaldCLUT names that are too long to fit into it * Ellipsize long HaldCLUT names Functionality moved to ClutComboBox constructor. * Wrapped in Gtk::manage Wrapped in Gtk::manage * Compacted.
This commit is contained in:
parent
be94d40c69
commit
c2c7f2c862
@ -64,6 +64,7 @@ FilmSimulation::FilmSimulation()
|
|||||||
: FoldableToolPanel( this, "filmsimulation", M("TP_FILMSIMULATION_LABEL"), false, true )
|
: FoldableToolPanel( this, "filmsimulation", M("TP_FILMSIMULATION_LABEL"), false, true )
|
||||||
{
|
{
|
||||||
m_clutComboBox = Gtk::manage( new ClutComboBox(options.clutsDir) );
|
m_clutComboBox = Gtk::manage( new ClutComboBox(options.clutsDir) );
|
||||||
|
|
||||||
int foundClutsCount = m_clutComboBox->foundClutsCount();
|
int foundClutsCount = m_clutComboBox->foundClutsCount();
|
||||||
|
|
||||||
if ( foundClutsCount == 0 ) {
|
if ( foundClutsCount == 0 ) {
|
||||||
@ -218,7 +219,11 @@ ClutComboBox::ClutComboBox(const Glib::ustring &path):
|
|||||||
set_model(m_model());
|
set_model(m_model());
|
||||||
|
|
||||||
if (cm->count > 0) {
|
if (cm->count > 0) {
|
||||||
pack_start(m_columns().label, false);
|
// Pack a CellRendererText in order to display long Clut file names properly
|
||||||
|
Gtk::CellRendererText* const renderer = Gtk::manage(new Gtk::CellRendererText);
|
||||||
|
renderer->property_ellipsize() = Pango::ELLIPSIZE_END;
|
||||||
|
pack_start(*renderer, false);
|
||||||
|
add_attribute(*renderer, "text", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!options.multiDisplayMode) {
|
if (!options.multiDisplayMode) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user