Kateryna Kostiuk | 958cd07 | 2017-07-14 15:56:35 -0400 | [diff] [blame] | 1 | /* |
Sébastien Blin | 029ffa8 | 2019-01-02 17:43:48 -0500 | [diff] [blame] | 2 | * Copyright (C) 2017-2019 Savoir-faire Linux Inc. |
Kateryna Kostiuk | 958cd07 | 2017-07-14 15:56:35 -0400 | [diff] [blame] | 3 | * Author: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com> |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 18 | */ |
| 19 | #import "IconButton.h" |
| 20 | |
| 21 | @interface HoverButton : IconButton { |
| 22 | @private |
| 23 | |
| 24 | NSTrackingArea *trackingArea; |
| 25 | } |
| 26 | /* |
| 27 | * Background color of the button when mouse inside |
Kateryna Kostiuk | e28a038 | 2019-10-25 16:29:08 -0400 | [diff] [blame^] | 28 | * default value : [NSColor clearColor] |
Kateryna Kostiuk | 958cd07 | 2017-07-14 15:56:35 -0400 | [diff] [blame] | 29 | */ |
| 30 | @property (nonatomic, strong) NSColor* hoverColor; |
| 31 | |
| 32 | /* |
Kateryna Kostiuk | 88a6ee8 | 2019-09-10 17:55:08 -0400 | [diff] [blame] | 33 | * image color of the button when mouse inside |
| 34 | */ |
| 35 | @property (nonatomic, strong) NSColor* imageHoverColor; |
| 36 | |
| 37 | /* |
| 38 | * Image color of the button when mouse inside |
| 39 | */ |
| 40 | @property (nonatomic, strong) NSColor* moiuseOutsideImageColor; |
| 41 | |
| 42 | /* |
Kateryna Kostiuk | 958cd07 | 2017-07-14 15:56:35 -0400 | [diff] [blame] | 43 | * Background color of the button when mouse outside |
| 44 | * default value : [NSColor clearColor]; |
| 45 | */ |
| 46 | @property (nonatomic, strong) NSColor* mouseOutsideColor; |
| 47 | |
Kateryna Kostiuk | 88a6ee8 | 2019-09-10 17:55:08 -0400 | [diff] [blame] | 48 | /* |
Kateryna Kostiuk | 88a6ee8 | 2019-09-10 17:55:08 -0400 | [diff] [blame] | 49 | * Value to increase image size when mouse entered |
| 50 | */ |
| 51 | |
| 52 | @property CGFloat imageIncreaseOnHover; |
| 53 | |
Kateryna Kostiuk | e28a038 | 2019-10-25 16:29:08 -0400 | [diff] [blame^] | 54 | /* |
| 55 | * Value to increase text size when mouse entered |
| 56 | */ |
| 57 | |
| 58 | @property CGFloat textIncreaseOnHover; |
| 59 | |
| 60 | /* |
| 61 | * Background color of the button when mouse inside in light mode |
| 62 | * default value : [NSColor clearColor] |
| 63 | */ |
| 64 | @property (nonatomic, strong) NSColor* hoverLightColor; |
| 65 | |
| 66 | /* |
| 67 | * image color of the button when mouse inside in light mode |
| 68 | */ |
| 69 | @property (nonatomic, strong) NSColor* imageHoverLightColor; |
| 70 | |
| 71 | /* |
| 72 | * Image color of the button when mouse inside in light mode |
| 73 | */ |
| 74 | @property (nonatomic, strong) NSColor* moiuseOutsideImageLightColor; |
| 75 | |
| 76 | /* |
| 77 | * Background color of the button when mouse outside in light mode |
| 78 | * default value : [NSColor clearColor]; |
| 79 | */ |
| 80 | @property (nonatomic, strong) NSColor* mouseOutsideLightColor; |
| 81 | |
| 82 | /* |
| 83 | * Background color of the button when mouse inside in dark mode |
| 84 | * default value : [NSColor clearColor] |
| 85 | */ |
| 86 | @property (nonatomic, strong) NSColor* hoverDarkColor; |
| 87 | |
| 88 | /* |
| 89 | * image color of the button when mouse inside in dark mode |
| 90 | */ |
| 91 | @property (nonatomic, strong) NSColor* imageHoverDarkColor; |
| 92 | |
| 93 | /* |
| 94 | * Image color of the button when mouse inside in dark mode |
| 95 | */ |
| 96 | @property (nonatomic, strong) NSColor* moiuseOutsideImageDarkColor; |
| 97 | |
| 98 | /* |
| 99 | * Background color of the button when mouse outside in dark mode |
| 100 | * default value : [NSColor clearColor]; |
| 101 | */ |
| 102 | @property (nonatomic, strong) NSColor* mouseOutsideDarkColor; |
| 103 | |
Kateryna Kostiuk | 958cd07 | 2017-07-14 15:56:35 -0400 | [diff] [blame] | 104 | @end |