Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1122)

Side by Side Diff: ui/native_theme/native_theme_win.cc

Issue 2413223003: Views:: Make Labels support text selection. (Closed)
Patch Set: Rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/native_theme/native_theme_mac.mm ('k') | ui/views/controls/label.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/native_theme/native_theme_win.h" 5 #include "ui/native_theme/native_theme_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <uxtheme.h> 9 #include <uxtheme.h>
10 #include <vsstyle.h> 10 #include <vsstyle.h>
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 // MenuItem: 514 // MenuItem:
515 const SkColor kMenuSchemeHighlightBackgroundColorInvert = 515 const SkColor kMenuSchemeHighlightBackgroundColorInvert =
516 SkColorSetRGB(0x30, 0x30, 0x30); 516 SkColorSetRGB(0x30, 0x30, 0x30);
517 // Table: 517 // Table:
518 const SkColor kPositiveTextColor = SkColorSetRGB(0x0b, 0x80, 0x43); 518 const SkColor kPositiveTextColor = SkColorSetRGB(0x0b, 0x80, 0x43);
519 const SkColor kNegativeTextColor = SkColorSetRGB(0xc5, 0x39, 0x29); 519 const SkColor kNegativeTextColor = SkColorSetRGB(0xc5, 0x39, 0x29);
520 // Results Tables: 520 // Results Tables:
521 const SkColor kResultsTableUrlColor = 521 const SkColor kResultsTableUrlColor =
522 md ? gfx::kGoogleBlue700 : SkColorSetRGB(0x0b, 0x80, 0x43); 522 md ? gfx::kGoogleBlue700 : SkColorSetRGB(0x0b, 0x80, 0x43);
523 const SkColor kResultsTableSelectedUrlColor = SK_ColorWHITE; 523 const SkColor kResultsTableSelectedUrlColor = SK_ColorWHITE;
524 // Label:
525 const SkColor kLabelTextSelectionBackgroundFocusedColor = gfx::kGoogleBlue700;
524 526
525 switch (color_id) { 527 switch (color_id) {
526 // Windows 528 // Windows
527 case kColorId_WindowBackground: 529 case kColorId_WindowBackground:
528 return system_colors_[COLOR_WINDOW]; 530 return system_colors_[COLOR_WINDOW];
529 531
530 // Dialogs 532 // Dialogs
531 case kColorId_DialogBackground: 533 case kColorId_DialogBackground:
532 case kColorId_BubbleBackground: 534 case kColorId_BubbleBackground:
533 if (ui::MaterialDesignController::IsSecondaryUiMaterial()) 535 if (ui::MaterialDesignController::IsSecondaryUiMaterial())
(...skipping 12 matching lines...) Expand all
546 case kColorId_ButtonEnabledColor: 548 case kColorId_ButtonEnabledColor:
547 return system_colors_[COLOR_BTNTEXT]; 549 return system_colors_[COLOR_BTNTEXT];
548 case kColorId_ButtonHoverColor: 550 case kColorId_ButtonHoverColor:
549 return kButtonHoverColor; 551 return kButtonHoverColor;
550 552
551 // Label 553 // Label
552 case kColorId_LabelEnabledColor: 554 case kColorId_LabelEnabledColor:
553 return system_colors_[COLOR_BTNTEXT]; 555 return system_colors_[COLOR_BTNTEXT];
554 case kColorId_LabelDisabledColor: 556 case kColorId_LabelDisabledColor:
555 return system_colors_[COLOR_GRAYTEXT]; 557 return system_colors_[COLOR_GRAYTEXT];
558 case kColorId_LabelTextSelectionColor:
559 return system_colors_[COLOR_HIGHLIGHTTEXT];
560 case kColorId_LabelTextSelectionBackgroundFocused:
561 return kLabelTextSelectionBackgroundFocusedColor;
556 562
557 // Textfield 563 // Textfield
558 case kColorId_TextfieldDefaultColor: 564 case kColorId_TextfieldDefaultColor:
559 return system_colors_[COLOR_WINDOWTEXT]; 565 return system_colors_[COLOR_WINDOWTEXT];
560 case kColorId_TextfieldDefaultBackground: 566 case kColorId_TextfieldDefaultBackground:
561 return system_colors_[COLOR_WINDOW]; 567 return system_colors_[COLOR_WINDOW];
562 case kColorId_TextfieldReadOnlyColor: 568 case kColorId_TextfieldReadOnlyColor:
563 return system_colors_[COLOR_GRAYTEXT]; 569 return system_colors_[COLOR_GRAYTEXT];
564 case kColorId_TextfieldReadOnlyBackground: 570 case kColorId_TextfieldReadOnlyBackground:
565 return system_colors_[COLOR_3DFACE]; 571 return system_colors_[COLOR_3DFACE];
(...skipping 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after
2116 break; 2122 break;
2117 case LAST: 2123 case LAST:
2118 NOTREACHED(); 2124 NOTREACHED();
2119 break; 2125 break;
2120 } 2126 }
2121 theme_handles_[theme_name] = handle; 2127 theme_handles_[theme_name] = handle;
2122 return handle; 2128 return handle;
2123 } 2129 }
2124 2130
2125 } // namespace ui 2131 } // namespace ui
OLDNEW
« no previous file with comments | « ui/native_theme/native_theme_mac.mm ('k') | ui/views/controls/label.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698