Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chrome/browser/ui/libgtk2ui/native_theme_gtk2.h" | 5 #include "chrome/browser/ui/libgtk2ui/native_theme_gtk2.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 | 8 |
| 9 #include "chrome/browser/ui/libgtk2ui/chrome_gtk_menu_subclasses.h" | 9 #include "chrome/browser/ui/libgtk2ui/chrome_gtk_menu_subclasses.h" |
| 10 #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h" | 10 #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h" |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 366 case kColorId_ResultsTableHoveredDivider: { | 366 case kColorId_ResultsTableHoveredDivider: { |
| 367 GtkStyle* win_style = GetWindowStyle(); | 367 GtkStyle* win_style = GetWindowStyle(); |
| 368 return GdkAlphaBlend(win_style->text[GTK_STATE_PRELIGHT], | 368 return GdkAlphaBlend(win_style->text[GTK_STATE_PRELIGHT], |
| 369 win_style->bg[GTK_STATE_PRELIGHT], 0x34); | 369 win_style->bg[GTK_STATE_PRELIGHT], 0x34); |
| 370 } | 370 } |
| 371 case kColorId_ResultsTableSelectedDivider: { | 371 case kColorId_ResultsTableSelectedDivider: { |
| 372 GtkStyle* win_style = GetWindowStyle(); | 372 GtkStyle* win_style = GetWindowStyle(); |
| 373 return GdkAlphaBlend(win_style->text[GTK_STATE_SELECTED], | 373 return GdkAlphaBlend(win_style->text[GTK_STATE_SELECTED], |
| 374 win_style->bg[GTK_STATE_SELECTED], 0x34); | 374 win_style->bg[GTK_STATE_SELECTED], 0x34); |
| 375 } | 375 } |
| 376 case kColorId_ResultsTablePositiveText: { | |
| 377 GdkColor color = {0}; | |
| 378 color.green = ~0; | |
| 379 return color; | |
|
Peter Kasting
2015/03/14 01:54:13
You should use GetReadableColor() anytime you hard
dschuyler
2015/03/16 21:49:09
Done.
| |
| 380 } | |
| 381 case kColorId_ResultsTablePositiveHoveredText: { | |
| 382 GdkColor color = {0}; | |
| 383 color.green = ~0; | |
| 384 GtkStyle* entry_style = GetEntryStyle(); | |
| 385 return GdkAlphaBlend(color, entry_style->base[GTK_STATE_PRELIGHT], 0x80); | |
| 386 } | |
| 387 case kColorId_ResultsTablePositiveSelectedText: { | |
| 388 GdkColor color = {0}; | |
| 389 color.green = ~0; | |
| 390 GtkStyle* entry_style = GetEntryStyle(); | |
| 391 return GdkAlphaBlend(color, entry_style->base[GTK_STATE_SELECTED], 0x80); | |
|
Peter Kasting
2015/03/14 01:54:14
I don't think this is what you want. You're makin
dschuyler
2015/03/16 21:49:09
Done.
| |
| 392 } | |
| 393 case kColorId_ResultsTableNegativeText: { | |
| 394 GdkColor color = {0}; | |
| 395 color.red = ~0; | |
| 396 return color; | |
| 397 } | |
| 398 case kColorId_ResultsTableNegativeHoveredText: { | |
| 399 GdkColor color = {0}; | |
| 400 color.red = ~0; | |
| 401 GtkStyle* entry_style = GetEntryStyle(); | |
| 402 return GdkAlphaBlend(color, entry_style->base[GTK_STATE_PRELIGHT], 0x80); | |
| 403 } | |
| 404 case kColorId_ResultsTableNegativeSelectedText: { | |
| 405 GdkColor color = {0}; | |
| 406 color.red = ~0; | |
| 407 GtkStyle* entry_style = GetEntryStyle(); | |
| 408 return GdkAlphaBlend(color, entry_style->base[GTK_STATE_SELECTED], 0x80); | |
| 409 } | |
| 376 case kColorId_NumColors: | 410 case kColorId_NumColors: |
| 377 NOTREACHED(); | 411 NOTREACHED(); |
| 378 break; | 412 break; |
| 379 } | 413 } |
| 380 | 414 |
| 381 return SkColorToGdkColor(kInvalidColorIdColor); | 415 return SkColorToGdkColor(kInvalidColorIdColor); |
| 382 } | 416 } |
| 383 | 417 |
| 384 GtkWidget* NativeThemeGtk2::GetRealizedWindow() const { | 418 GtkWidget* NativeThemeGtk2::GetRealizedWindow() const { |
| 385 if (!fake_window_) { | 419 if (!fake_window_) { |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 486 0, 0, | 520 0, 0, |
| 487 rect.width(), rect.height()); | 521 rect.width(), rect.height()); |
| 488 SkBitmap arrow = GdkPixbufToImageSkia(pb); | 522 SkBitmap arrow = GdkPixbufToImageSkia(pb); |
| 489 canvas->drawBitmap(arrow, rect.x(), rect.y()); | 523 canvas->drawBitmap(arrow, rect.x(), rect.y()); |
| 490 | 524 |
| 491 g_object_unref(pb); | 525 g_object_unref(pb); |
| 492 g_object_unref(pm); | 526 g_object_unref(pm); |
| 493 } | 527 } |
| 494 | 528 |
| 495 } // namespace libgtk2ui | 529 } // namespace libgtk2ui |
| OLD | NEW |