cefclient: mac: Fix type conversion error with Xcode

This commit is contained in:
Marshall Greenblatt 2023-07-06 13:19:51 +03:00
parent 67c33c2cff
commit 5ab64c1012
2 changed files with 3 additions and 2 deletions

View File

@ -184,7 +184,8 @@ void ViewsMenuBar::OnMenuButtonPressed(
button_bounds.y - button_bounds.height; button_bounds.y - button_bounds.height;
// Approximation of the menu height. // Approximation of the menu height.
const int menu_height = menu_model->GetCount() * button_bounds.height; const int menu_height =
static_cast<int>(menu_model->GetCount()) * button_bounds.height;
if (menu_height > available_height) { if (menu_height > available_height) {
// The menu will go upwards, so place it above the button. // The menu will go upwards, so place it above the button.
point.y -= button_bounds.height - 8; point.y -= button_bounds.height - 8;

View File

@ -570,7 +570,7 @@ void ViewsWindow::OnMenuButtonPressed(
// Approximation of the menu height. // Approximation of the menu height.
const int menu_height = const int menu_height =
button_menu_model_->GetCount() * button_bounds.height; static_cast<int>(button_menu_model_->GetCount()) * button_bounds.height;
if (menu_height > available_height) { if (menu_height > available_height) {
// The menu will go upwards, so place it above the button. // The menu will go upwards, so place it above the button.
point.y -= button_bounds.height - 8; point.y -= button_bounds.height - 8;