ios13 switching between light/dark mode not reflected on displayed keyboard with inputAccessoryView initially - ios13

When switching between light and dark mode with iOS 13, I am experiencing an unusual behavior with the keyboard showing.
The view has an inputAccessoryView for a user to type in messages. When then light/dark mode is switched with the keyboard showing, the light/dark mode does not reflect on the keyboard until the keyboard is hidden and shown again. Initially this is what I'm seeing when switching between dark and light mode:
After dismissing the keyboard and showing again the color is normal. This only happens on this keyboard with the inputAccessoryView. When the mode is changed with just the inputAccessoryView without keyboard showing the inputAccessoryView colors change as expected.

I came across this too. My solution was to resignFirstResponder on the UITextView in the inputAccessoryView when the color appearance changes. Not ideal, but gets round the problem.
(I had to override resignFirstResponder in the messageInputAccessoryView to resignFirstResponder on the textView)
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
super.traitCollectionDidChange(previousTraitCollection)
if #available(iOS 13.0, *) {
if self.traitCollection.hasDifferentColorAppearance(comparedTo: previousTraitCollection) {
_ = messageInputAccessoryView.resignFirstResponder()
}
}
}

Related

Awesome WM - How to Prevent freerdp from grabbing keyboard in fullscreen mode?

I made a dock to start several programms. It appears when the mouse touches the screen border.
When I use xfreerdp in multimonitor mode xfreerdp will automaticaly open in fullscreen mode and grabs the keyboard.
After that, I start e.g. firefox from my dock, however I canĀ“t use the keyboard, because xfreerdp doesn`t release it.
At the moment I use a workarround and minimize xfreerdp when it is in fullscreen mode and looses the focus.
However I wonder if is not possible for awesome to force xfreerdp to release the keyboard?
Thanks in advance.
PS. The xfreerdp "Right-Ctrl ungrab feature" doesn't work for me.

How to change the iOS Simulator "window background color" (Full Screen, Xcode 10, Mojave, Dark Mode)

Mojave (macOS 10.14) is great.
Xcode 10.0 (10A254a) is great.
Dark Mode is great.
What is not so great, unless I'm missing something, is this ugly gray background of the iOS simulator window (when in full screen):
Any idea on how to change that color?
If anybody still struggles with this here is somewhat a solution: toggle "Show Device Bezels" in the window menu of the simulator will do the trick. However this needs to be done each time the simulator is started....
I have the answer you seek.
Boot into recovery mode (Cmd+R while booting) and then open the Terminal.
cd /Volumes/Macintosh\ HD //if your drive is named something different, replace accordingly
csrutil disable //disables System Integrity Protection
mkdir AppleInternal //activates testing and custom commands in Apple apps, including Simulator
csrutil enable //re-enable System Integrity Protection
reboot //back to regular environment
Now there's an "Internal" menu in the Simulator. In here, you can change loads of settings including the window's background color. It uses the regular OS X colour picker so you can even choose a hex code.
The correct answer to this (I'm on Catalina 10.15.7): Change your desktop background to the desired color. The simulator adapts to the color with a different opacity (or alpha?!) value when in fullscreen mode.

Qt Creator is running in fullscreen

I have a weird issue with QT Creator. The soft is opening in full screen.
It is annoying because I don't have the bar with File, Edit, Tools etc...
How to disable this fullscreen mode ?
Thanks
You can switch between fullscreen and window mode using Ctrl+Shift+F11. Still, it's strange that the menus aren't visible, normally they are retained even in full screen mode.

Hide cursor in fullscreen mode using Qt 4.8?

I'm in a ArchLinux with OpenBox and I want to hide the cursor on fullscreen inside a Qt 4.8 application. I am aware about some other question about it but no one works every time: sometimes the cursor is hiding, sometimes not. I didn't managed to understand exactly when the problem occurs but I think that maybe is it related with the screensaver because if I test my application just after the computer is restarted the mouse cursor is no visible (and it is what I want) but if I test this feature during the day the mouse cursor is still visible in fullscreen.
This is my code:
void MainWindow::toggleFullScreen()
{
if(!this->isFullScreen())
{
this->showFullScreen();
#ifdef Q_WS_QWS
QWSServer::setCursorVisible( false );
#endif
}
else
{
this->showNormal();
}
}
I want to hide the cursor on fullscreen ...
You could set the cursor to be the blank cursor:
widget->setCursor(Qt::BlankCursor);
Also, as the docs state:
Some underlying window implementations will reset the cursor if it leaves a widget even if the mouse is grabbed. If you want to have a cursor set for all widgets, even when outside the window, consider QApplication::setOverrideCursor().
So you can call:
QApplication::setOverrideCursor(Qt::BlankCursor);
There is a program named unclutter that hides the mouse pointer. Here's an ArchLinux package:
https://www.archlinux.org/packages/community/i686/unclutter/
I currently use it on an embedded system for hiding the mouse cursor on a touchscreen.

Qt Disable QTextEdit without disabling scroll bar

In qt how do you disable a QTextEdit without disabling the scroll bar? Its for previewing purposes.
You can set the QTextEdit as read only:
http://doc.qt.io/qt-4.8/qtextedit.html#readOnly-prop
If you want it to "look disabled", you can also set the foreground and background roles to the disabled colors.

Resources