Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Development and suggestions about third part tool integration.
Cordova, Xamarin, Basic4Android topics are listed here.
  • Page:
  • 1

TOPIC:

Cannot set thumbnail selection color 3 years 10 months ago #15390

  • thoechtl
  • thoechtl's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 14
  • Thank you received: 0
We use the current version of the Cordova plugin and want to change the highlight color of the currently selected thumbnail to match our app theme. If I understand the docs (www.radaeepdf.com/support/knowledge-base?view=kb&kbartid=146) it should be possible with the following snippet:
RadaeePDFPlugin.setGlobal({
  name: 'g_sel_color',
  value: 0x4020c4b2,
});

But this does not work for me.

I also tried to set the variable _g_sel_color directly in RDVGlobal.m and some other approaches, but everything without success.

Could you please help me? We have to change the color for iOS and Android ...
Attachments:

Please Log in or Create an account to join the conversation.

Cannot set thumbnail selection color 3 years 10 months ago #15392

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
dear user:
we checked some codes, and found that select color of thumb view is not using g_sel_color.
you can find codes from [PDFThumbView onDrawOffScreen] implement in PDFThumbView.m
    if(m_sel_pno >= 0 && m_sel_pno >= start && m_sel_pno <= end)
    {
        RDVPage *vpage = [m_layout vGetPage:m_sel_pno];
        float scale = 1.0f/(m_zoom * m_scale_pix);
        float left = (float)vpage.x - self.contentOffset.x * m_scale_pix;
        float top = (float)vpage.y - self.contentOffset.y * m_scale_pix;
        CGRect rect = CGRectMake(scale * left, scale * top, scale * vpage.w, scale * vpage.h);
        //CGRect rect = CGRectMake(0, 0, scale * vpage.w, scale * vpage.h);
        CGFloat clr[4] = {0, 0, 1, 0.25};   //currently, select color is const value
        CGContextSetFillColor(ctx, clr);
        CGContextFillRect(ctx, rect);
    }
that line:
CGFloat clr[4] = {0, 0, 1, 0.25};
is blue transparency color.
The following user(s) said Thank You: thoechtl

Please Log in or Create an account to join the conversation.

Last edit: by radaee.
  • Page:
  • 1
Powered by Kunena Forum