Code editor area only in Geany in fullscreen mode - editor

OK, I would like to keep Sidebar, Toolbar and Message Window active when working in Geany, in normal mode, but I would also like to hide all these elements when switching to fullscreen mode.
Is there any way to reduce fullscreen mode to just a code editor area?
I'd be grateful for your help.

When changing to fullscreen there is no hook to hide other widgets. But: View->Toggle All Additional Widgets should do the deal.

Related

Electron scrollbars are not dark in dark mode

https://github.com/electron/electron/blob/master/docs/api/native-theme.md
electron.nativeTheme.themeSource = 'dark';
When changing to dark mode, the native scrollbars stay light. Is there another step required to get them to display dark?
In the shot below, the left shows my browser window, right is the dev tools. Dev tools has the dark scrollbar, so the support is there somewhere.
Ugh this was soooo complicated to work out. There are two things you need to do:
Use the color-scheme CSS/meta tag to indicate to Chrome that your page is happy being rendered in light and dark mode. I think this also changes the default User Agent stylesheet to dark mode in dark mode. This really seems like a stupid design.
I only tested the meta tag, and it's probably the best option: add this to your <head>:
<meta name="color-scheme" content="light dark">
(dark light works too, supposedly the order encodes the author's preference but I seriously doubt it has any effect.)
Dark scrollbars are still an experimental feature in Chrome, so you need to enable the feature flag. You can do this with the following flag when you create windows:
new BrowserWindow({
webPreferences: {
enableBlinkFeatures: "CSSColorSchemeUARendering",
},
...
}),
The corresponding flag under chrome://flags is called Web Platform Controls Dark Mode (yeay consistency).
You can probably also do it using app.commandLine.addSwitch("enable-features", "CSSColorSchemeUARendering"); but I think the above method is cleaner.
With that I finally have dark scrollbars.

Electron app - Custom components in native header

Is it possible in Electron to put custom components into the native application header?
For example, to achieve a design as such:
Currently my app just has the default one with just the title text
Is there a way to make it bigger and put content in there? Or do I have to somehow hide the native header and recreate the native buttons myself?
I suspect it's the latter, but in that case, how do I hide the native one and hook up ability to drag the window with it?
Or is this design entirely not possible in Electron?
The design you're looking for can be achieved, but only on macOS, by using the titleBarStyle property set to either hidden, hiddenInset, or even customButtonsOnHover, in the options passed to new BrowserWindow().
This is explained in more detail in Alternatives on macOS:
There's an alternative way to specify a chromeless window. Instead of
setting frame to false which disables both the titlebar and window
controls, you may want to have the title bar hidden and your content
extend to the full window size, yet still preserve the window controls
("traffic lights") for standard window actions.
There might still be a few issues, such as not being able to drag around the window from its title bar any more, but they are documented in the Frameless Window page; for instance, this specific problem can be solved by adding -webkit-app-region: drag; to the CSS relative to the region(s) you wish to make draggable.

View Pager EditText hint issue in Landscape mode

Using View Pager I want to change edit text hint runtime, It displays correct hint when I scroll view pager but when I tape on edit text to write something it shows wrong hint(Hint of the previous page), you can check with gif file that I have attached.
Note: When I set Text on edit text this issue is not found, it occurs only with a set hint. I'm using 'com.android.support:design:28.0.0'. The app is in Landscape mode. It is working fine in portrait mode.
Did anyone face this issue?

Electron BrowserWindow shows taskbar when focused

My application is an overlay (alwaysOnTop) for a full screen game and when the user clicks on my overlay it takes focus and shows the taskbar on top of their game as well. Taking focus is fine, but I can't have the taskbar show.
It says in the BrowserWindow docs:
not a toolbox window which can not be focused on
Implying that it is possible to create a window which cannot be focused on.
Does anyone know how to create a toolbox window, or to simply avoid having the taskbar showing when clicking on the electron window?
I should mention I've tried setAlwaysOnTop and skipTaskbar. I also have transparent: true and frame: false.
The overlay I've created is the "Safelane, Midlane, Offlane" buttons. When I run the application it shows on top of the full screen app (Dota 2) like this:
After clicking on the interface the taskbar appears. It would be fine that the full screen app (Dota) loses focus, the task bar appears on top which breaks the continuity of the experience:
I would like the experience to stay like the first image--when the user clicks on anything in my overlay, the taskbar should not show.
Electron GitHub Issue
Additional Solution Info -- After using Gaafar's solution below
Setting kiosk: true in the setup does not seem to allow it to render transparent. Using setKiosk(true) within a setTimeout after the window has been opened seemed to work.
I also found that any windows using kiosk or fullscreen with transparency had rendering issue. It would render multiple times on top of itself and could not unrender items (display: none in css would do nothing). The way I fixed this was by using Electron Window Manager creating a single kiosk window with nothing in it and creating other non-kiosk windows with the HTML / CSS interfaces. The result:
All of the interfaces can be interacted with, mouse and keyboard.
Rendering happens as it does regularly in electron.
The fullscreen application below receives input through any transparent areas.
Taskbar never shows up on any input.
skipTaskbar: true is to prevent showing your app in the taskbar.
To hide the taskbar altogether use fullscreen or kiosk mode instead
fullscreen: true
or
kiosk: true
EDIT:
There are some issues open where fullscreen or kiosk modes prevent the transparency of the window.
A solution that works for me is to run with these flags --enable-transparent-visuals --disable-gpu
issue & solution: https://github.com/electron/electron/issues/2170#issuecomment-145942717
showInActive();
set your BrowserWindows, focusable: false
Im gonna post a solution some might be facing with full screening, I was facing this issue and wandering here and there, this StackOverflow post kept coming up.
So Im posting it here so people getting similar problems can get help.
When fullscreening taskbar getting in way.
When you fullscreen using mainWindow.setFullScreen(true) taskbar will get in way when you are on home (all windows minimized) in windows.
Here is the solution:
ipcMain.on("fullscreenon",()=>{
mainWindow.setAlwaysOnTop(true, 'screen-saver');
mainWindow.setFullScreen(true);
})
//The order of the commands is important below
//don't setAlwaysOnTop() before getting out of fullscreen.
ipcMain.on("fullscreenoff",()=>{
mainWindow.setFullScreen(false);
mainWindow.setAlwaysOnTop(true, 'floating')
})
Basically, by default setFullscreen uses the level: "floating". We need a higher level, "screen-saver" is the highest level I think.

Make a website automatically load in Landscape view on an iPad

I'm wondering if anyone can help me. I have created a website and I want it to automatically load in landscape view on the iPad. Is this possible and if so can it be done with javascript or css?
You can't change the frame (the Safari window, status bar, URL bar, etc) from inside JavaScript / HTML, but you could wrap your whole site in a div and add the "-webkit-transform: rotate(90deg);" attribute when you detect that it's in portrait orientation.
That will display your site in landscape, but the user will probably then rotate the device itself into landscape which would then rotate your content incorrectly oriented relative to the user. You'd have to detect that using JS and remove the CSS attribute above when you truly are in landscape. If you're using jQuery or something I could imagine it being relatively easy, but the user may still see a bit of flickering as the content bounces around.

Resources