//
//  GMTopSearchButton.m
//  Gengmei
//
//  Created by wangyang on 4/27/15.
//  Copyright (c) 2015 Wanmeichuangyi. All rights reserved.
//

#import "GMTopSearchButton.h"
#import "GMFont.h"
#import <UIColor+GMTheme.h>
@implementation GMTopSearchButton

- (void)setup{
    
    [super setup];
    self.backgroundColor = [UIColor clearColor];
    [self setTitle:@"搜索项目、商品、专家" forState:UIControlStateNormal];
    [self setImage:[UIImage imageNamed:@"search_button"] forState:UIControlStateNormal];
    [self setTitleColor:RGBCOLOR_HEX(0xcccccc) forState:UIControlStateNormal];
    [self setTitle:@"搜索项目、商品、专家" forState:UIControlStateHighlighted];
    [self setImage:[UIImage imageNamed:@"search_button"] forState:UIControlStateHighlighted];
    [self setTitleColor:RGBCOLOR_HEX(0xcccccc) forState:UIControlStateHighlighted];
    self.titleLabel.font = [UIFont gmFont:13];
    
    // 微调位置，以后搜索页的导航placeholder位置一模一样
    self.titleEdgeInsets = UIEdgeInsetsMake(-2, 8, 0, 0);
    self.imageEdgeInsets = UIEdgeInsetsMake(-1, -7, 0, 0);
}

@end
