Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
Unity Webview
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FrameIT
Unity Webview
Commits
923dcaa9
Verified
Commit
923dcaa9
authored
8 months ago
by
Björn Eßwein
Browse files
Options
Downloads
Patches
Plain Diff
fix browser scrollbars by removing viewport scale (this might result in a bit more blurry text)
parent
db127971
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Runtime/ChromeDevtools/BrowserTab.cs
+0
-8
0 additions, 8 deletions
Runtime/ChromeDevtools/BrowserTab.cs
Runtime/WebViewComponent.cs
+1
-2
1 addition, 2 deletions
Runtime/WebViewComponent.cs
with
1 addition
and
10 deletions
Runtime/ChromeDevtools/BrowserTab.cs
+
0
−
8
View file @
923dcaa9
...
...
@@ -95,14 +95,6 @@ namespace bessw.Unity.WebView.ChromeDevTools
height
=
size
.
y
,
screenWidth
=
size
.
x
,
screenHeight
=
size
.
y
,
viewport
=
new
()
{
X
=
0
,
Y
=
0
,
Width
=
size
.
x
,
Height
=
size
.
y
,
Scale
=
pageScaleFactor
}
});
Size
=
size
;
PageScaleFactor
=
pageScaleFactor
;
...
...
This diff is collapsed.
Click to expand it.
Runtime/WebViewComponent.cs
+
1
−
2
View file @
923dcaa9
...
...
@@ -111,7 +111,6 @@ namespace bessw.Unity.WebView
{
Width
=
tab
.
Size
.
x
,
Height
=
tab
.
Size
.
y
,
Scale
=
PageScaleFactor
},
(
screenshot
)
=>
{
...
...
@@ -219,7 +218,7 @@ namespace bessw.Unity.WebView
// invert y because the browser has y=0 on the top
Vector2
invertedLocalPos
=
new
Vector2
(
localPoint
.
x
,
rectTransform
.
rect
.
size
.
y
-
localPoint
.
y
);
Vector2
textureScale
=
tab
.
StreamSize
/
rectTransform
.
rect
.
size
;
Vector2
browserCoorinate
=
invertedLocalPos
*
textureScale
/
tab
.
Page
ScaleFactor
;
Vector2
browserCoorinate
=
invertedLocalPos
*
textureScale
;
//
/ tab.
Viewport
ScaleFactor;
Debug
.
Log
(
$"eventPos:
{
eventPos
}
, invertedLocalPos:
{
invertedLocalPos
}
, browserCoordinate:
{
browserCoorinate
}
"
);
return
new
Vector2Int
((
int
)
browserCoorinate
.
x
,
(
int
)
browserCoorinate
.
y
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment