Conversation
…linkHoverColor pageImageColorFilter recolors the page contents (rendered images and the blank placeholder) at draw time, so a dark theme can invert pages without wrapping the viewer in a ColorFiltered layer that composites the whole viewport on every frame and also recolors the overlays. linkHoverColor paints the link under the cursor in its own color; the canvas link handler repaints only when the hovered link changes and a hover color is set.
palmoni5
force-pushed
the
feat/page-color-filter-link-hover
branch
from
September 27, 2026 22:19
92129f9 to
d21f2b4
Compare
palmoni5
added a commit
to palmoni5/otzaria
that referenced
this pull request
Sep 27, 2026
…וכרטיסיית מפרשים עצמאית טעינה: לפני ש-pdfium פתח את הקובץ, ניסיון חוזר רק נעמד בתור ה-worker מאחורי הפתיחה שעדיין רצה. לכן אחרי ה-timeout הראשון מוצגת הודעה שהטעינה נמשכת, בלי retry; הכפתור מופיע רק אחרי ה-timeout השני. ה-retry השקט נשאר למקרה שהקובץ נפתח והצפיין לא התייצב. הצלחה מאוחרת שמגיעה אחרי הכפתור גוברת על השגיאה. מצב כהה: במקום ColorFilterLayer על כל הצפיין, pdfrx מסנן רק את ציור העמודים (pageImageColorFilter). הדגשות, בחירה, צל העמוד וקישוט תצוגת הספר נצבעים עכשיו בצבעי התמה ולא בהיפוך שלהם. הצילום המורכב לדפדוף עוקב אחרי אותו מודל. קישורים: מצוירים על הקנבס דרך linkHandlerParams במקום ווידג'ט לכל קישור שנבנה מחדש בכל פריים גלילה. הסמן והדגשת הריחוף נשמרים (linkHoverColor); אפקט הלחיצה ירד. דפדוף וריחוף: מצב שכבת הדפדוף וחיצי הריחוף מתעדכן דרך notifier משלו במקום setState על כל המסך. שכבת הקלט מעל הצפיין נבנית פעם אחת, וציור עובי הספר לא מתרענן כשהעמודים המוצגים לא השתנו. מפרשים: טעינה מוקדמת של חלון הקישורים לא בונה את החלונית שוב כשהחלון הישן עדיין מכסה את הטווח. היסטי תוצאות החיפוש בחלונית מחושבים פעם אחת לכל build במקום סריקה לכל פריט. כרטיסיית המפרשים נפתחת עם עותק משלה של מצב הספר (PdfCommentatorsTab.of), כמו כרטיסיית הטקסט: מיקום ומפרשים משלה, לא נגררת אחרי הדפדוף, ולא מכבה את חלון הקישורים של הספר. pdfrx: ההפניה לפורק תלויה גם ב-espresso3389/pdfrx#731.
Y-PLONI
pushed a commit
to palmoni5/otzaria
that referenced
this pull request
Sep 28, 2026
…וכרטיסיית מפרשים עצמאית טעינה: לפני ש-pdfium פתח את הקובץ, ניסיון חוזר רק נעמד בתור ה-worker מאחורי הפתיחה שעדיין רצה. לכן אחרי ה-timeout הראשון מוצגת הודעה שהטעינה נמשכת, בלי retry; הכפתור מופיע רק אחרי ה-timeout השני. ה-retry השקט נשאר למקרה שהקובץ נפתח והצפיין לא התייצב. הצלחה מאוחרת שמגיעה אחרי הכפתור גוברת על השגיאה. מצב כהה: במקום ColorFilterLayer על כל הצפיין, pdfrx מסנן רק את ציור העמודים (pageImageColorFilter). הדגשות, בחירה, צל העמוד וקישוט תצוגת הספר נצבעים עכשיו בצבעי התמה ולא בהיפוך שלהם. הצילום המורכב לדפדוף עוקב אחרי אותו מודל. קישורים: מצוירים על הקנבס דרך linkHandlerParams במקום ווידג'ט לכל קישור שנבנה מחדש בכל פריים גלילה. הסמן והדגשת הריחוף נשמרים (linkHoverColor); אפקט הלחיצה ירד. דפדוף וריחוף: מצב שכבת הדפדוף וחיצי הריחוף מתעדכן דרך notifier משלו במקום setState על כל המסך. שכבת הקלט מעל הצפיין נבנית פעם אחת, וציור עובי הספר לא מתרענן כשהעמודים המוצגים לא השתנו. מפרשים: טעינה מוקדמת של חלון הקישורים לא בונה את החלונית שוב כשהחלון הישן עדיין מכסה את הטווח. היסטי תוצאות החיפוש בחלונית מחושבים פעם אחת לכל build במקום סריקה לכל פריט. כרטיסיית המפרשים נפתחת עם עותק משלה של מצב הספר (PdfCommentatorsTab.of), כמו כרטיסיית הטקסט: מיקום ומפרשים משלה, לא נגררת אחרי הדפדוף, ולא מכבה את חלון הקישורים של הספר. pdfrx: ההפניה לפורק תלויה גם ב-espresso3389/pdfrx#731.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two small additive parameters.
PdfViewerParams.pageImageColorFilterA
ColorFilterapplied when drawing the page contents: the rendered preview, the high-resolution partial image and the blank placeholder.Recoloring pages today (e.g. inverting them for a dark theme) means wrapping the viewer in a
ColorFiltered. That composites an extra full-viewport layer on every frame, and it recolors everything drawn inside the viewer too: selection, search matches, link highlights, overlays. The app then has to pre-invert those colors so they come out right. With the parameter, only the page pixels are filtered; highlights andpagePaintCallbacksare drawn unfiltered in their real colors.PdfLinkHandlerParams.linkHoverColorPaints the link under the mouse cursor in its own color. Otherwise the hovered link is painted with
linkColor.This gives the canvas link handler the hover feedback that currently needs
linkWidgetBuilder, which builds a widget for every link on every rebuild. It repaints only when the hovered link changes, and only when a hover color is set. Links whose color is fully transparent are skipped, solinkColor: Colors.transparenttogether with a hover color shows a highlight on hover only.Both default to
null, so existing behavior doesn't change.