appearance

How can dark mode be detected on macOS 10.14?

左心房为你撑大大i 提交于 2019-11-30 02:22:56
In macOS 10.14 users can choose to adopt a system-wide light or dark appearance and I need to adjust some colours manually depend of the current mode. Since the actual appearance object you usually get via effectiveAppearance is a composite appearance, asking for its name directly probably isn't a reliable solution. Asking for the currentAppearance usually isn't a good idea, either, as a view may be explicitly set to light mode or you want to know whether a view is light or dark outside of a drawRect: where you might get incorrect results after a mode switch. The solution I came up with looks

Use jquery to make div appear after a user scrolls

那年仲夏 提交于 2019-11-29 10:24:42
问题 I'd like to have a div appear after a user scrolls down on a page, and disappears if they scroll back to the top. I thought using the .scroll() function in jquery would be useful, but couldn't quite figure out how to make this happen. Any help would be appreciated. Thanks! 回答1: Something like this should do the trick: $(window).scroll(function() { if ($(this).scrollTop() == 0) { $("#mydiv:visible").hide(); } else { $("#mydiv:hidden").show(); } }); 来源: https://stackoverflow.com/questions

Custom webview keyboard issues

非 Y 不嫁゛ 提交于 2019-11-29 07:52:27
So adapting code form this thread UIKeyboardAppearance in UIWebView and TomSwift's awesome answer, I got about 99% of it working. In the iOS 7 simulator, everything appears to work just fine. However in iOS 8, when the keyboard first appears, the < > Done bar is white. When I tap or select another input, it changes to my specified color. My question is, how can I prevent and or change that white portion? All code in the other thread is identical, except for my color which I call like so in the keyboardWillAppear. UIWindow *keyboardWindow = nil; for (UIWindow *testWindow in [[UIApplication

UINavigationBar appearance refresh?

女生的网名这么多〃 提交于 2019-11-29 05:51:27
问题 In my iPad app I have an application settings view. One of the options lets the user switch interface color scheme. The settings view is loaded by segue to a separate view controller than my "main" app's window. When they pick a new color I switch the colorSchemeColor variable and do this: // set the colors and refresh the view [[UINavigationBar appearance] setBarTintColor:colorSchemeColor]; [[UIToolbar appearance] setBarTintColor:colorSchemeColor]; [[UITabBar appearance] setBarTintColor

Google Maps api v3 tools: visual distortions?

不想你离开。 提交于 2019-11-29 02:01:34
问题 I just noticed that the gMap view tools are displaying…rather unusually. Their regions still seem to be properly defined—I can interact with them just fine, it's just their appearance that looks messed up. I haven't applied any CSS to any of the map pieces, and the only css I've applied to the map container is width:100%; height:100%; z-index:0; (which I normally do). I do have other elements on the page which have position:absolute; and position:fixed; and some high z-index s (500 & 1000).

How do I make a UITableViewCell appear disabled?

放肆的年华 提交于 2019-11-29 01:21:22
问题 I know about UITableview: How to Disable Selection for Some Rows but Not Others and cell.selectionStyle = UITableViewCellSelectionStyleNone , but how do I make a cell (or any UIView for that matter) appear disabled (grayed-out) like below? 回答1: You can just disable the cell's text fields to gray them out: Swift 4.x cell!.isUserInteractionEnabled = false cell!.textLabel!.isEnabled = false cell!.detailTextLabel!.isEnabled = false 回答2: Thanks to @Ajay Sharma, I figured out how to make a

css3 appearance property for IE

烈酒焚心 提交于 2019-11-28 23:41:39
I have a problem with the css3 appearance property in IE. I need it to hide a select menu's arrow, but it's just not working. I tried PIE.htc, ie-css3.htc and other IE CSS3 supporters, but none of them work with appearance. Help me, please! Thanks in advance! .listing select{ appearance: none; -moz-appearance: none; -webkit-appearance: none; background: url("../images/select-bg.jpg") no-repeat scroll 0 0 transparent; text-indent: 0.01px; text-overflow: ""; } .listing select::-ms-expand{ display: none; } Note : For Chrome, Mozilla & IE 10 Works fine. appearance property is no longer supported.

How can dark mode be detected on macOS 10.14?

我们两清 提交于 2019-11-28 23:12:14
问题 In macOS 10.14 users can choose to adopt a system-wide light or dark appearance and I need to adjust some colours manually depend of the current mode. 回答1: Since the actual appearance object you usually get via effectiveAppearance is a composite appearance, asking for its name directly probably isn't a reliable solution. Asking for the currentAppearance usually isn't a good idea, either, as a view may be explicitly set to light mode or you want to know whether a view is light or dark outside

Default font for Windows Forms application

不问归期 提交于 2019-11-28 18:11:58
Every time that I create a new form in my application, it uses the "Microsoft Sans Serif, 8.25pt" font by default. I'm not changing it because I know that in this case my form should pick up whatever the default font is for the system. However, when I run my application, the font that is used is still anything but Segoe UI (my default system font in my Windows Vista OS). Why does this happen? How do I make sure that my application looks like a normal Windows application? Check out this blog entry talking about the default font in Forms which leads to the problem you are experiencing and this

Custom webview keyboard issues

て烟熏妆下的殇ゞ 提交于 2019-11-28 01:36:56
问题 So adapting code form this thread UIKeyboardAppearance in UIWebView and TomSwift's awesome answer, I got about 99% of it working. In the iOS 7 simulator, everything appears to work just fine. However in iOS 8, when the keyboard first appears, the < > Done bar is white. When I tap or select another input, it changes to my specified color. My question is, how can I prevent and or change that white portion? All code in the other thread is identical, except for my color which I call like so in