mirror of
https://github.com/fltk/fltk.git
synced 2026-05-30 13:05:35 +08:00
Reverting unintentionally committed experimental code in r8256. Sorry.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8258 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -356,13 +356,11 @@ void Fl_Text_Display::resize(int X, int Y, int W, int H) {
|
|||||||
if (scrollbar_align() & FL_ALIGN_LEFT) {
|
if (scrollbar_align() & FL_ALIGN_LEFT) {
|
||||||
text_area.x = X+scrollbar_width()+LEFT_MARGIN;
|
text_area.x = X+scrollbar_width()+LEFT_MARGIN;
|
||||||
text_area.w = W-scrollbar_width()-LEFT_MARGIN-RIGHT_MARGIN;
|
text_area.w = W-scrollbar_width()-LEFT_MARGIN-RIGHT_MARGIN;
|
||||||
mWrapMarginPix = text_area.w - 2;
|
|
||||||
mVScrollBar->resize(X, text_area.y-TOP_MARGIN, scrollbar_width(),
|
mVScrollBar->resize(X, text_area.y-TOP_MARGIN, scrollbar_width(),
|
||||||
text_area.h+TOP_MARGIN+BOTTOM_MARGIN);
|
text_area.h+TOP_MARGIN+BOTTOM_MARGIN);
|
||||||
} else {
|
} else {
|
||||||
text_area.x = X+LEFT_MARGIN;
|
text_area.x = X+LEFT_MARGIN;
|
||||||
text_area.w = W-scrollbar_width()-LEFT_MARGIN-RIGHT_MARGIN;
|
text_area.w = W-scrollbar_width()-LEFT_MARGIN-RIGHT_MARGIN;
|
||||||
mWrapMarginPix = text_area.w - 2;
|
|
||||||
mVScrollBar->resize(X+W-scrollbar_width(), text_area.y-TOP_MARGIN,
|
mVScrollBar->resize(X+W-scrollbar_width(), text_area.y-TOP_MARGIN,
|
||||||
scrollbar_width(), text_area.h+TOP_MARGIN+BOTTOM_MARGIN);
|
scrollbar_width(), text_area.h+TOP_MARGIN+BOTTOM_MARGIN);
|
||||||
}
|
}
|
||||||
@@ -389,14 +387,8 @@ void Fl_Text_Display::resize(int X, int Y, int W, int H) {
|
|||||||
/* WAS: Suggestion: Try turning the horizontal scrollbar on when
|
/* WAS: Suggestion: Try turning the horizontal scrollbar on when
|
||||||
you first see a line that is too wide in the window, but then
|
you first see a line that is too wide in the window, but then
|
||||||
don't turn it off (ie mix both of your solutions). */
|
don't turn it off (ie mix both of your solutions). */
|
||||||
#if (1) // original h-scrollbar code
|
if (scrollbar_align() & (FL_ALIGN_TOP|FL_ALIGN_BOTTOM) &&
|
||||||
if ((scrollbar_align() & (FL_ALIGN_TOP|FL_ALIGN_BOTTOM)) &&
|
|
||||||
(mVScrollBar->visible() || longest_vline() > text_area.w))
|
(mVScrollBar->visible() || longest_vline() > text_area.w))
|
||||||
#else // modified h-scrollbar code
|
|
||||||
if ((scrollbar_align() & (FL_ALIGN_TOP|FL_ALIGN_BOTTOM)) &&
|
|
||||||
(mVScrollBar->visible() || longest_vline() > text_area.w) &&
|
|
||||||
!mContinuousWrap )
|
|
||||||
#endif // modified h-scrollbar code
|
|
||||||
{
|
{
|
||||||
if (!mHScrollBar->visible()) {
|
if (!mHScrollBar->visible()) {
|
||||||
mHScrollBar->set_visible();
|
mHScrollBar->set_visible();
|
||||||
|
|||||||
+1
-2
@@ -776,8 +776,7 @@ Fl_Window* new_view() {
|
|||||||
w->editor = new Fl_Text_Editor(0, 30, 660, 370);
|
w->editor = new Fl_Text_Editor(0, 30, 660, 370);
|
||||||
w->editor->textfont(FL_COURIER);
|
w->editor->textfont(FL_COURIER);
|
||||||
w->editor->textsize(TS);
|
w->editor->textsize(TS);
|
||||||
//
|
//w->editor->wrap_mode(Fl_Text_Editor::WRAP_AT_BOUNDS, 250);
|
||||||
w->editor->wrap_mode(Fl_Text_Editor::WRAP_AT_BOUNDS, 0);
|
|
||||||
w->editor->buffer(textbuf);
|
w->editor->buffer(textbuf);
|
||||||
w->editor->highlight_data(stylebuf, styletable,
|
w->editor->highlight_data(stylebuf, styletable,
|
||||||
sizeof(styletable) / sizeof(styletable[0]),
|
sizeof(styletable) / sizeof(styletable[0]),
|
||||||
|
|||||||
Reference in New Issue
Block a user