Cleanup
@ -457,9 +457,9 @@ class ItemListStickerPackItemNode: ItemListRevealOptionsItemNode {
|
||||
}
|
||||
|
||||
if let editableControlSizeAndApply = editableControlSizeAndApply {
|
||||
let editableControlFrame = CGRect(origin: CGPoint(x: params.leftInset + revealOffset, y: 0.0), size: CGSize(width: editableControlSizeAndApply.0, height: layout.size.height))
|
||||
let editableControlFrame = CGRect(origin: CGPoint(x: params.leftInset + revealOffset, y: 0.0), size: CGSize(width: editableControlSizeAndApply.0, height: layout.contentSize.height))
|
||||
if strongSelf.editableControlNode == nil {
|
||||
let editableControlNode = editableControlSizeAndApply.1(layout.size.height)
|
||||
let editableControlNode = editableControlSizeAndApply.1(layout.contentSize.height)
|
||||
editableControlNode.tapped = {
|
||||
if let strongSelf = self {
|
||||
strongSelf.setRevealOptionsOpened(true, animated: true)
|
||||
|
@ -259,8 +259,6 @@
|
||||
#import <LegacyComponents/TGRemoteImageView.h>
|
||||
#import <LegacyComponents/TGReplyMarkupAttachment.h>
|
||||
#import <LegacyComponents/TGReplyMessageMediaAttachment.h>
|
||||
#import <LegacyComponents/TGSearchBar.h>
|
||||
#import <LegacyComponents/TGSearchDisplayMixin.h>
|
||||
#import <LegacyComponents/TGStaticBackdropAreaData.h>
|
||||
#import <LegacyComponents/TGStaticBackdropImageData.h>
|
||||
#import <LegacyComponents/TGStickerAssociation.h>
|
||||
|
@ -1,94 +0,0 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@class TGSearchBar;
|
||||
|
||||
typedef enum {
|
||||
TGSearchBarStyleDefault = 0,
|
||||
TGSearchBarStyleDark = 1,
|
||||
TGSearchBarStyleLight = 2,
|
||||
TGSearchBarStyleLightPlain = 3,
|
||||
TGSearchBarStyleLightAlwaysPlain = 4,
|
||||
TGSearchBarStyleHeader = 5,
|
||||
TGSearchBarStyleKeyboard = 6
|
||||
} TGSearchBarStyle;
|
||||
|
||||
@protocol TGSearchBarDelegate <UISearchBarDelegate>
|
||||
|
||||
- (void)searchBar:(TGSearchBar *)searchBar willChangeHeight:(CGFloat)newHeight;
|
||||
|
||||
@end
|
||||
|
||||
@interface TGSearchBarPallete : NSObject
|
||||
|
||||
@property (nonatomic, readonly) bool isDark;
|
||||
@property (nonatomic, readonly) UIColor *backgroundColor;
|
||||
@property (nonatomic, readonly) UIColor *highContrastBackgroundColor;
|
||||
@property (nonatomic, readonly) UIColor *textColor;
|
||||
@property (nonatomic, readonly) UIColor *placeholderColor;
|
||||
@property (nonatomic, readonly) UIImage *clearIcon;
|
||||
@property (nonatomic, readonly) UIColor *barBackgroundColor;
|
||||
@property (nonatomic, readonly) UIColor *barSeparatorColor;
|
||||
@property (nonatomic, readonly) UIColor *plainBackgroundColor;
|
||||
@property (nonatomic, readonly) UIColor *accentColor;
|
||||
@property (nonatomic, readonly) UIColor *accentContrastColor;
|
||||
@property (nonatomic, readonly) UIColor *menuBackgroundColor;
|
||||
@property (nonatomic, readonly) UIImage *segmentedControlBackgroundImage;
|
||||
@property (nonatomic, readonly) UIImage *segmentedControlSelectedImage;
|
||||
@property (nonatomic, readonly) UIImage *segmentedControlHighlightedImage;
|
||||
@property (nonatomic, readonly) UIImage *segmentedControlDividerImage;
|
||||
|
||||
+ (instancetype)palleteWithDark:(bool)dark backgroundColor:(UIColor *)backgroundColor highContrastBackgroundColor:(UIColor *)highContrastBackgroundColor textColor:(UIColor *)textColor placeholderColor:(UIColor *)placeholderColor clearIcon:(UIImage *)clearIcon barBackgroundColor:(UIColor *)barBackgroundColor barSeparatorColor:(UIColor *)barSeparatorColor plainBackgroundColor:(UIColor *)plainBackgroundColor accentColor:(UIColor *)accentColor accentContrastColor:(UIColor *)accentContrastColor menuBackgroundColor:(UIColor *)menuBackgroundColor segmentedControlBackgroundImage:(UIImage *)segmentedControlBackgroundImage segmentedControlSelectedImage:(UIImage *)segmentedControlSelectedImage segmentedControlHighlightedImage:(UIImage *)segmentedControlHighlightedImage segmentedControlDividerImage:(UIImage *)segmentedControlDividerImage;
|
||||
|
||||
@end
|
||||
|
||||
@interface TGSearchBar : UIView
|
||||
|
||||
+ (CGFloat)searchBarBaseHeight;
|
||||
+ (CGFloat)searchBarScopeHeight;
|
||||
- (CGFloat)baseHeight;
|
||||
|
||||
@property (nonatomic, copy) void (^clearPrefix)(bool);
|
||||
|
||||
@property (nonatomic, assign) UIEdgeInsets safeAreaInset;
|
||||
|
||||
@property (nonatomic, weak) id<TGSearchBarDelegate> delegate;
|
||||
@property (nonatomic) bool highContrast;
|
||||
|
||||
@property (nonatomic, strong) UITextField *customTextField;
|
||||
@property (nonatomic, readonly) UITextField *maybeCustomTextField;
|
||||
|
||||
@property (nonatomic, strong) UIImageView *customBackgroundView;
|
||||
@property (nonatomic, strong) UIImageView *customActiveBackgroundView;
|
||||
|
||||
@property (nonatomic, strong) NSArray *customScopeButtonTitles;
|
||||
@property (nonatomic) NSInteger selectedScopeButtonIndex;
|
||||
@property (nonatomic) bool showsScopeBar;
|
||||
@property (nonatomic) bool scopeBarCollapsed;
|
||||
|
||||
@property (nonatomic) bool searchBarShouldShowScopeControl;
|
||||
@property (nonatomic) bool alwaysExtended;
|
||||
@property (nonatomic) bool hidesCancelButton;
|
||||
|
||||
@property (nonatomic, strong) UIButton *customCancelButton;
|
||||
|
||||
@property (nonatomic) TGSearchBarStyle style;
|
||||
@property (nonatomic, strong) NSString *text;
|
||||
@property (nonatomic, strong) NSString *placeholder;
|
||||
@property (nonatomic, strong) NSAttributedString *prefixText;
|
||||
|
||||
@property (nonatomic) bool showActivity;
|
||||
@property (nonatomic) bool delayActivity;
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame style:(TGSearchBarStyle)style;
|
||||
|
||||
- (void)setShowsCancelButton:(bool)showsCancelButton animated:(bool)animated;
|
||||
|
||||
- (void)setCustomScopeBarHidden:(bool)hidden;
|
||||
|
||||
- (void)updateClipping:(CGFloat)clippedHeight;
|
||||
|
||||
- (void)localizationUpdated;
|
||||
|
||||
- (void)setPallete:(TGSearchBarPallete *)pallete;
|
||||
|
||||
@end
|
@ -1,46 +0,0 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@class TGSearchDisplayMixin;
|
||||
@class TGSearchBar;
|
||||
|
||||
@protocol TGSearchDisplayMixinDelegate <NSObject>
|
||||
|
||||
@required
|
||||
|
||||
- (UITableView *)createTableViewForSearchMixin:(TGSearchDisplayMixin *)searchMixin;
|
||||
- (UIView *)referenceViewForSearchResults;
|
||||
- (void)searchMixin:(TGSearchDisplayMixin *)searchMixin hasChangedSearchQuery:(NSString *)searchQuery withScope:(int)scope;
|
||||
|
||||
@optional
|
||||
|
||||
- (void)searchMixinWillActivate:(bool)animated;
|
||||
- (void)searchMixinWillDeactivate:(bool)animated;
|
||||
|
||||
@end
|
||||
|
||||
@interface TGSearchDisplayMixin : NSObject
|
||||
|
||||
@property (nonatomic, weak) id<TGSearchDisplayMixinDelegate> delegate;
|
||||
|
||||
@property (nonatomic, strong) TGSearchBar *searchBar;
|
||||
@property (nonatomic) bool isActive;
|
||||
@property (nonatomic, strong) UITableView *searchResultsTableView;
|
||||
@property (nonatomic) bool alwaysShowsCancelButton;
|
||||
|
||||
@property (nonatomic) bool searchResultsTableViewHidden;
|
||||
|
||||
@property (nonatomic) bool simpleLayout;
|
||||
|
||||
- (void)setSearchResultsTableViewHidden:(bool)searchResultsTableViewHidden animated:(bool)animated;
|
||||
|
||||
- (void)setIsActive:(bool)isActive animated:(bool)animated;
|
||||
|
||||
- (void)controllerInsetUpdated:(UIEdgeInsets)controllerInset;
|
||||
- (void)controllerLayoutUpdated:(CGSize)layoutSize;
|
||||
|
||||
- (void)reloadSearchResults;
|
||||
- (void)resignResponderIfAny;
|
||||
|
||||
- (void)unload;
|
||||
|
||||
@end
|
Before Width: | Height: | Size: 328 B |
Before Width: | Height: | Size: 640 B |
Before Width: | Height: | Size: 911 B |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 153 B |
Before Width: | Height: | Size: 424 B |
Before Width: | Height: | Size: 422 B |
Before Width: | Height: | Size: 534 B |
Before Width: | Height: | Size: 554 B |
Before Width: | Height: | Size: 262 B |
Before Width: | Height: | Size: 262 B |
Before Width: | Height: | Size: 623 B |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 155 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 139 B |
Before Width: | Height: | Size: 479 B |
Before Width: | Height: | Size: 979 B |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 442 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 908 B |
Before Width: | Height: | Size: 384 B |
Before Width: | Height: | Size: 740 B |
Before Width: | Height: | Size: 619 B |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 716 B |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 851 B |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 107 B |
Before Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 496 B |
Before Width: | Height: | Size: 645 B |
Before Width: | Height: | Size: 294 B |
Before Width: | Height: | Size: 916 B |
Before Width: | Height: | Size: 74 B |
Before Width: | Height: | Size: 105 B |
Before Width: | Height: | Size: 294 B |
Before Width: | Height: | Size: 902 B |
Before Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 664 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 749 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 914 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 949 B |
Before Width: | Height: | Size: 936 B |
Before Width: | Height: | Size: 720 B |
Before Width: | Height: | Size: 305 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 263 B |
Before Width: | Height: | Size: 353 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 400 B |
Before Width: | Height: | Size: 539 B |
Before Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 248 B |
Before Width: | Height: | Size: 660 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 165 B |
Before Width: | Height: | Size: 276 B |
Before Width: | Height: | Size: 402 B |
Before Width: | Height: | Size: 146 B |
Before Width: | Height: | Size: 263 B |
Before Width: | Height: | Size: 388 B |
Before Width: | Height: | Size: 371 B |
Before Width: | Height: | Size: 875 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 87 B |
Before Width: | Height: | Size: 111 B |