assistant_ui_constants.cc 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright 2018 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "ash/assistant/ui/assistant_ui_constants.h"
  5. #include "ash/constants/ash_features.h"
  6. #include "base/no_destructor.h"
  7. #include "ui/base/class_property.h"
  8. #include "ui/gfx/font_list.h"
  9. namespace ash {
  10. namespace assistant {
  11. namespace ui {
  12. DEFINE_UI_CLASS_PROPERTY_KEY(bool, kOnlyAllowMouseClickEvents, false)
  13. const gfx::FontList& GetDefaultFontList() {
  14. static const base::NoDestructor<gfx::FontList> font_list("Google Sans, 12px");
  15. return *font_list;
  16. }
  17. int GetHorizontalMargin() {
  18. // Expected margin for productivity launcher case is 24. But
  19. // AppListBubbleAssistantPage is shifted by 1px, i.e. has 1px margin. See
  20. // b/233384263 for details.
  21. return features::IsProductivityLauncherEnabled() ? 23 : 32;
  22. }
  23. int GetHorizontalPadding() {
  24. return features::IsProductivityLauncherEnabled() ? 20 : 14;
  25. }
  26. } // namespace ui
  27. } // namespace assistant
  28. } // namespace ash