the break position was calculated as br = draw_w - draw_x + (left_gap / list.font_w); adding left_gap/font_w was making br too large, so lines were allowed to go past the drawable area and the last character got clipped. changed to: br = draw_w - draw_x; br /= list.font_w; just the remaining pixels divided by char width, no left_gap needed here Co-authored-by: Burer <burer@kolibrios.org> Reviewed-on: #386 Reviewed-by: Burer <burer@kolibrios.org> Co-authored-by: jaskaran-singh-77 <jassijatt951@gmail.com> Co-committed-by: jaskaran-singh-77 <jassijatt951@gmail.com>
This commit was merged in pull request #386.
This commit is contained in:
@@ -84,7 +84,7 @@ void TWebBrowser::RenderTextbuf()
|
||||
|
||||
//Is a new line fits in the maximum line width?
|
||||
if (br * list.font_w + draw_x - left_gap >= draw_w) {
|
||||
br = draw_w - draw_x + left_gap /list.font_w;
|
||||
br = draw_w - draw_x / list.font_w;
|
||||
if (br < 0) br = 0;
|
||||
while(br) {
|
||||
if (ESBYTE[lbp + br]==' ') {
|
||||
|
||||
@@ -113,4 +113,4 @@ char editbox_icons[] = FROM "res/editbox_icons.raw";
|
||||
|
||||
#define DEFAULT_URL URL_SERVICE_HOMEPAGE
|
||||
|
||||
char version[]="WebView 3.93";
|
||||
char version[]="WebView 3.94";
|
||||
|
||||
Reference in New Issue
Block a user