mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Fix warnings
This commit is contained in:
parent
805b79b32c
commit
562f4781c5
1 changed files with 10 additions and 10 deletions
|
@ -83,8 +83,8 @@ Controls::SwapChainPanel ServoControl::Panel() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServoControl::CreateNativeWindow() {
|
void ServoControl::CreateNativeWindow() {
|
||||||
mPanelWidth = Panel().ActualWidth() * mDPI;
|
mPanelWidth = (int)(Panel().ActualWidth() * mDPI);
|
||||||
mPanelHeight = Panel().ActualHeight() * mDPI;
|
mPanelHeight = (int)(Panel().ActualHeight() * mDPI);
|
||||||
mNativeWindowProperties.Insert(EGLNativeWindowTypeProperty, Panel());
|
mNativeWindowProperties.Insert(EGLNativeWindowTypeProperty, Panel());
|
||||||
// How to set size and or scale:
|
// How to set size and or scale:
|
||||||
// Insert(EGLRenderSurfaceSizeProperty),
|
// Insert(EGLRenderSurfaceSizeProperty),
|
||||||
|
@ -513,29 +513,29 @@ void ServoControl::OnServoPromptAlert(winrt::hstring message, bool trusted) {
|
||||||
PromptSync(title, message, L"OK", {}, {});
|
PromptSync(title, message, L"OK", {}, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
servo::Servo::PromptResult
|
Servo::PromptResult
|
||||||
ServoControl::OnServoPromptOkCancel(winrt::hstring message, bool trusted) {
|
ServoControl::OnServoPromptOkCancel(winrt::hstring message, bool trusted) {
|
||||||
auto title = trusted ? L"" : mCurrentUrl + L" says:";
|
auto title = trusted ? L"" : mCurrentUrl + L" says:";
|
||||||
auto [button, string] = PromptSync(title, message, L"OK", L"Cancel", {});
|
auto [button, string] = PromptSync(title, message, L"OK", L"Cancel", {});
|
||||||
if (button == Controls::ContentDialogResult::Primary) {
|
if (button == Controls::ContentDialogResult::Primary) {
|
||||||
return servo::Servo::PromptResult::Primary;
|
return Servo::PromptResult::Primary;
|
||||||
} else if (button == Controls::ContentDialogResult::Secondary) {
|
} else if (button == Controls::ContentDialogResult::Secondary) {
|
||||||
return servo::Servo::PromptResult::Secondary;
|
return Servo::PromptResult::Secondary;
|
||||||
} else {
|
} else {
|
||||||
return servo::Servo::PromptResult::Dismissed;
|
return Servo::PromptResult::Dismissed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
servo::Servo::PromptResult
|
Servo::PromptResult
|
||||||
ServoControl::OnServoPromptYesNo(winrt::hstring message, bool trusted) {
|
ServoControl::OnServoPromptYesNo(winrt::hstring message, bool trusted) {
|
||||||
auto title = trusted ? L"" : mCurrentUrl + L" says:";
|
auto title = trusted ? L"" : mCurrentUrl + L" says:";
|
||||||
auto [button, string] = PromptSync(title, message, L"Yes", L"No", {});
|
auto [button, string] = PromptSync(title, message, L"Yes", L"No", {});
|
||||||
if (button == Controls::ContentDialogResult::Primary) {
|
if (button == Controls::ContentDialogResult::Primary) {
|
||||||
return servo::Servo::PromptResult::Primary;
|
return Servo::PromptResult::Primary;
|
||||||
} else if (button == Controls::ContentDialogResult::Secondary) {
|
} else if (button == Controls::ContentDialogResult::Secondary) {
|
||||||
return servo::Servo::PromptResult::Secondary;
|
return Servo::PromptResult::Secondary;
|
||||||
} else {
|
} else {
|
||||||
return servo::Servo::PromptResult::Dismissed;
|
return Servo::PromptResult::Dismissed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue