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