EditorBarFix.diff
CodeEditor/CodeEditor.h (kopia robocza) | ||
---|---|---|
98 | 98 | |
99 | 99 |
void Scroll() { Refresh(); } |
100 | 100 | |
101 |
void SyncWidth();
|
|
101 |
void SyncSize();
|
|
102 | 102 | |
103 | 103 |
void Renumber(int linecount); |
104 | 104 |
void ClearBreakpoints(); |
... | ... | |
416 | 416 |
void CheckEdited(bool e = true) { check_edited = e; } |
417 | 417 |
bool GetCheckEdited() { return check_edited; } |
418 | 418 | |
419 |
void EditorBarLayout() { bar.SyncWidth(); }
|
|
419 |
void EditorBarLayout() { bar.SyncSize(); }
|
|
420 | 420 | |
421 | 421 |
LineInfo GetLineInfo() const { return bar.GetLineInfo(); } |
422 | 422 |
void SetLineInfo(const LineInfo& lf); |
CodeEditor/EditorBar.cpp (kopia robocza) | ||
---|---|---|
476 | 476 |
Refresh(); |
477 | 477 |
} |
478 | 478 | |
479 |
void EditorBar::SyncWidth()
|
|
479 |
void EditorBar::SyncSize()
|
|
480 | 480 |
{ |
481 | 481 |
int n = editor ? editor->GetLineCount() : 0; |
482 | 482 |
int i = 0; |
... | ... | |
485 | 485 |
n /= 10; |
486 | 486 |
} |
487 | 487 |
int w = (line_numbers && editor ? editor->GetFont()['0'] * i : 0) + 12 + 4 + annotations; |
488 |
if(w != GetWidth()) {
|
|
488 |
if(w != GetWidth()) |
|
489 | 489 |
Width(w); |
490 |
Refresh(); |
|
491 |
} |
|
490 |
Refresh(); |
|
492 | 491 |
} |
493 | 492 | |
494 | 493 |
void EditorBar::LineNumbers(bool b) |
495 | 494 |
{ |
496 | 495 |
line_numbers = b; |
497 |
SyncWidth();
|
|
496 |
SyncSize();
|
|
498 | 497 |
} |
499 | 498 | |
500 | 499 |
void EditorBar::Annotations(int width) |
501 | 500 |
{ |
502 | 501 |
annotations = width; |
503 |
SyncWidth();
|
|
502 |
SyncSize();
|
|
504 | 503 |
} |
505 | 504 | |
506 | 505 |
EditorBar::EditorBar() |
... | ... | |
513 | 512 |
annotations = 0; |
514 | 513 |
ignored_next_edit = false; |
515 | 514 |
next_age = 0; |
516 |
SyncWidth();
|
|
515 |
SyncSize();
|
|
517 | 516 |
} |
518 | 517 | |
519 | 518 |
EditorBar::~EditorBar() |