[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    [Bug 31951] line length in Kmail does not scale with window size
From:       "Jens B.Benecke" <jens-bugs.kde.org () spamfreemail ! de>
Date:       2006-04-21 13:33:50
Message-ID: 20060421133350.11423.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=31951         




------- Additional Comments From jens-bugs.kde.org spamfreemail de  2006-04-21 15:33 \
------- Hi,

a possible solution (if my C++ parsing skills are correct):

in http://websvn.kde.org/trunk/KDE/kdepim/kmail/kmcomposewin.cpp?rev=532058&view=auto \
the widget "KMEdit" seems to inherit from "KEdit", and this code is used:

  if (GlobalSettings::self()->wordWrap())
  {
    mEditor->setWordWrap( Q3MultiLineEdit::FixedColumnWidth );
    mEditor->setWrapColumnOrWidth( GlobalSettings::self()->lineWrapWidth() );
  }
  else
  {
    mEditor->setWordWrap( Q3MultiLineEdit::NoWrap );
  }

In http://websvn.kde.org/trunk/KDE/kdeutils/kedit/kedit.cpp?rev=530649&view=auto the \
KEdit widget (I assume it's the same) is set to "soft word-wrap" by using 

  eframe = new KEdit (this);
  // ...
  if( Prefs::wrapMode() == Prefs::EnumWrapMode::FixedColumnWrap )
  {
    eframe->setWordWrap(Q3MultiLineEdit::FixedColumnWidth);
    eframe->setWrapColumnOrWidth(Prefs::wrapColumn());
  }
  else if( Prefs::wrapMode() == Prefs::EnumWrapMode::SoftWrap )
  {
    eframe->setWordWrap(Q3MultiLineEdit::WidgetWidth);
  }
  else
  {
    eframe->setWordWrap(Q3MultiLineEdit::NoWrap);
  }

Maybe this can be used in KMedit as well, since KMedit is inherited from KEdit? Just \
exchange the "NoWrap" in kmcompose.cpp to "WidgetWidth", change nothing else.

Can somebody who has a running development system try this out?

Thanks!

Jens
_______________________________________________
KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic