Ticket #12573: MediaPlayer-PositionToolTip-Color.2.patch

File MediaPlayer-PositionToolTip-Color.2.patch, 1.6 KB (added by looncraz, 9 years ago)

Improved Patch

  • src/apps/mediaplayer/interface/PositionToolTip.cpp

    From d87d5022b7dc63ba7f33be959043484c7d91118a Mon Sep 17 00:00:00 2001
    From: looncraz <looncraz@looncraz.net>
    Date: Sat, 9 Jan 2016 16:08:42 -0600
    Subject: [PATCH] MediaPlayer PositionToolTip Color
    
    Previously the layout would crush the default colors of BStringView preventing
    BStringView from calling AdoptParentColors() on its own, so we must call it
    manually.
    
    In addition, the default tooltip view should fully adopt tooltip colors so
    that any colors will default to the desired foreground color (which is the
    same as the tooltip text color).
    ---
     src/apps/mediaplayer/interface/PositionToolTip.cpp | 1 +
     src/kits/interface/ToolTipManager.cpp              | 1 +
     2 files changed, 2 insertions(+)
    
    diff --git a/src/apps/mediaplayer/interface/PositionToolTip.cpp b/src/apps/mediaplayer/interface/PositionToolTip.cpp
    index 667baae..698727b 100644
    a b public:  
    3030    virtual void AttachedToWindow()
    3131    {
    3232        BStringView::AttachedToWindow();
     33        AdoptParentColors();
    3334        Update(-1, -1);
    3435    }
    3536
  • src/kits/interface/ToolTipManager.cpp

    diff --git a/src/kits/interface/ToolTipManager.cpp b/src/kits/interface/ToolTipManager.cpp
    index 7f4d8a5..ad0f802 100644
    a b ToolTipView::ToolTipView(BToolTip* tip)  
    6767{
    6868    fToolTip->AcquireReference();
    6969    SetViewUIColor(B_TOOL_TIP_BACKGROUND_COLOR);
     70    SetHighUIColor(B_TOOL_TIP_TEXT_COLOR);
    7071
    7172    BGroupLayout* layout = new BGroupLayout(B_VERTICAL);
    7273    layout->SetInsets(5, 5, 5, 5);