Show
Ignore:
Timestamp:
06/06/08 07:23:44 (6 months ago)
Author:
eugene
Message:

Introduced Fixed font setting and made it to be used in network log and file editors.
Default fixed font is constructed by taking global qApp->font() and setting Monospace family on it.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/qt4-gui/src/widgets/mledit.cpp

    r6111 r6239  
    3232/* TRANSLATOR LicqQtGui::MLEdit */ 
    3333 
    34 MLEdit::MLEdit(bool wordWrap, QWidget* parent, bool /* doQuotes */, const char* name) 
     34MLEdit::MLEdit(bool wordWrap, QWidget* parent, bool useFixedFont, const char* name) 
    3535  : MLEDIT_BASE(parent), 
     36    myUseFixedFont(useFixedFont), 
    3637    myFixSetTextNewlines(true), 
    3738    myLastKeyWasReturn(false), 
     
    4647 
    4748  updateFont(); 
    48   connect(Config::General::instance(), SIGNAL(fontChanged()), SLOT(updateFont())); 
     49  connect(Config::General::instance(), 
     50      myUseFixedFont ? SIGNAL(fixedFontChanged()) : SIGNAL(fontChanged()), 
     51      SLOT(updateFont())); 
    4952} 
    5053 
     
    210213void MLEdit::updateFont() 
    211214{ 
    212   setFont(Config::General::instance()->editFont()); 
     215  setFont(myUseFixedFont ? Config::General::instance()->fixedFont() : 
     216      Config::General::instance()->editFont()); 
    213217 
    214218  // Get height of current font