Commit c6f40f60 authored by Ilkka Ollakka's avatar Ilkka Ollakka

QT4: enable fontdialog for choosing freetype-font family

At the moment it doesn't handle those size/bold/* stuff, only takes font
from it. But IMO still better than old file-choosing way.
parent c308d8ff
......@@ -136,12 +136,10 @@ ConfigControl *ConfigControl::createControl( vlc_object_t *p_this,
p_control = new DirectoryConfigControl( p_this, p_item, parent, l,
line );
break;
#if 0
case CONFIG_ITEM_FONT:
p_control = new FontConfigControl( p_this, p_item, parent, l,
line, false );
line);
break;
#endif
case CONFIG_ITEM_KEY:
p_control = new KeySelectorControl( p_this, p_item, parent, l, line );
break;
......@@ -370,20 +368,19 @@ void DirectoryConfigControl::updateField()
text->setText( toNativeSepNoSlash( dir ) );
}
#if 0
#include <QFontDialog>
/********* String / Font **********/
FontConfigControl::FontConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item, QWidget *_p_widget,
QGridLayout *_p_layout, int& _int, bool _pwd ) :
FileConfigControl( _p_this, _p_item, _p_widget, _p_layout, _int, _pwd)
QGridLayout *_p_layout, int& _int) :
FileConfigControl( _p_this, _p_item, _p_widget, _p_layout, _int)
{}
FontConfigControl::FontConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item, QLabel *_p_label,
QLineEdit *_p_line, QPushButton *_p_button, bool _pwd ):
FileConfigControl( _p_this, _p_item, _p_label, _p_line, _p_button, _pwd)
QLineEdit *_p_line, QPushButton *_p_button):
FileConfigControl( _p_this, _p_item, _p_label, _p_line, _p_button)
{}
void FontConfigControl::updateField()
......@@ -393,7 +390,6 @@ void FontConfigControl::updateField()
if( !ok ) return;
text->setText( font.family() );
}
#endif
/********* String / choice list **********/
StringListConfigControl::StringListConfigControl( vlc_object_t *_p_this,
......
......@@ -329,20 +329,18 @@ public slots:
virtual void updateField();
};
#if 0
class FontConfigControl : public FileConfigControl
{
Q_OBJECT;
public:
FontConfigControl( vlc_object_t *, module_config_t *, QWidget *,
QGridLayout *, int&, bool pwd );
QGridLayout *, int&);
FontConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QLineEdit *, QPushButton *, bool pwd );
QLineEdit *, QPushButton *);
virtual ~FontConfigControl() {};
public slots:
virtual void updateField();
};
#endif
class ModuleConfigControl : public VStringConfigControl
{
......
......@@ -576,7 +576,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
encoding );
CONFIG_GENERIC( "sub-language", String, ui.subLangLabel,
preferredLanguage );
CONFIG_GENERIC_FILE( "freetype-font", File, ui.fontLabel, ui.font,
CONFIG_GENERIC_FILE( "freetype-font", Font, ui.fontLabel, ui.font,
ui.fontBrowse );
CONFIG_GENERIC( "freetype-color", IntegerList, ui.fontColorLabel,
fontColor );
......
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