Show
Ignore:
Timestamp:
07/16/08 23:03:02 (4 months ago)
Author:
flynd
Message:

Added configuration to set history font separately.

Location:
trunk/qt4-gui/src/config
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/qt4-gui/src/config/general.cpp

    r6239 r6450  
    8181    szTemp[0] = '\0'; 
    8282  setEditFont(szTemp); 
     83  iniFile.ReadStr("HistoryFont", szTemp, "default"); 
     84  if (strcmp(szTemp, "default") == 0) 
     85    szTemp[0] = '\0'; 
     86  setHistoryFont(szTemp); 
    8387  iniFile.ReadStr("FixedFont", szTemp, "default"); 
    8488  if (strcmp(szTemp, "default") == 0) 
     
    148152  iniFile.WriteStr("EditFont", myEditFont == myDefaultFont ? 
    149153      "default" : myEditFont.toString().toLatin1()); 
     154  iniFile.WriteStr("HistoryFont", myHistoryFont == myDefaultFont ? 
     155      "default" : myHistoryFont.toString().toLatin1()); 
    150156  iniFile.WriteStr("FixedFont", myFixedFont == myDefaultFixedFont ? 
    151157      "default" : myFixedFont.toString().toLatin1()); 
     
    278284} 
    279285 
     286void Config::General::setHistoryFont(QString historyFont) 
     287{ 
     288  QFont f; 
     289  if (historyFont.isEmpty()) 
     290    f = myDefaultFont; 
     291  else 
     292    f.fromString(historyFont); 
     293 
     294  if (f == myHistoryFont) 
     295    return; 
     296 
     297  myHistoryFont = f; 
     298  if (myBlockUpdates) 
     299    myFontHasChanged = true; 
     300  else 
     301    emit fontChanged(); 
     302} 
     303 
    280304void Config::General::setFixedFont(QString fixedFont) 
    281305{ 
  • trunk/qt4-gui/src/config/general.h

    r6239 r6450  
    8383  QFont normalFont() const; 
    8484  QFont editFont() const { return myEditFont; } 
     85  QFont historyFont() const { return myHistoryFont; } 
    8586  QFont fixedFont() const { return myFixedFont; } 
    8687 
     
    126127  void setNormalFont(QString normalFont); 
    127128  void setEditFont(QString editFont); 
     129  void setHistoryFont(QString historyFont); 
    128130  void setFixedFont(QString fixedFont); 
    129131 
     
    204206  QFont myDefaultFixedFont; 
    205207  QFont myEditFont; 
     208  QFont myHistoryFont; 
    206209  QFont myFixedFont; 
    207210