Gnome Desktop Icons Alignment - desktop

It has been a long time since I started to compare the gnome desktop to the windows desktop.
But since I began to use linux, I realized that the "gnome way" to align the icons on Desktop is not that nice for me. And comparing to Windows's way, windows is better for me. (remember, for me).
I'd like to know if anyone has some tip to make "gnome desktop icon alignment" more like windows do. I tried to reduce the icon's size, did something, but was not that all.
So, could anyone tell another tip? I like when I put something on windows desktop, and wherever I put the file, Windows organize the file and put the icon right after the last icon (in a cascade style) (and automatically).
Any tips?

A different Linux desktop manager
The latest version of Gnome (Gnome 3) will snap desktop icons Windows-style by default (once you configure it to show the icons), and others have said KDE can do likewise.
If you must still use Gnome 2:
Apparently a couple people have come up with a tiled background to give the illusion of alignment; if such a thing is of interest to you, check here (and then set your desktop background to whatever you previously had when you are finished):
http://ubuntuforums.org/showthread.php?s=34f1c9161626ba4cdafd8652b0ef0caf&t=1679875

Gnome 3.22
Open dconf editor.
1. Navigate to
- org.gnome.nautilus.desktop > text-ellipsis-limit 1
- org.gnome.nautilus.icon-view > text-ellipsis-limit ['0']
- org.gnome.SessionManager > auto-save-session true
2.-Restart
On desktop right click and
check Keep aligned then Organise Desktop by name or
uncheck Keep aligNed and Organise Desktop by name.
This is the most you can get comparing to Windows's way (Gnome Desktop is really an unprofessional real mess!)
P.S. On org.gnome.nautilus.desktop > font xx --try different values to enlarge/shorten the icon label.

Related

Visual studio MFC dialog editor seems broken on my HiDPI monitor - is this a known problem?

I am coding a C++ project using MFC in Visual Studio (v16.5.4). The dialog editor seems badly broken on my HiDPI monitor (Lenovo ThinkVision 2880x1800 at 175%). It works fine on two other computers with standard monitors.
The dialogs get resized apparently randomly, and controls do not move correctly when I try to edit them. When I try to align controls the dotted selection rectangle may move, but the control often does not (in the editor). Sometimes, re-opening the editor shows that the control has in fact moved. When I build the project, the final display layout cannot be predicted from what appears in the resource editor.
I reported this to Microsoft using Visual Studio feedback, but they closed the report, saying it was "By design"!!!! They posted a link describing a feature which disables HiDPI awareness, but the link was for the Windows Forms Designer, not the MFC resource editor - there is no equivalent feature in the latter that I could find.
Does anyone else have this problem, or know of a decent work-around? At the moment I am transferring to my other computer with the standard display whenever I need to edit a dialog, which is monumentally inefficient for quite a large project.
I know this is an older post, but I thought what I found might help someone. I experienced the same issue today. It just happens that I have one monitor setup for 125% and one setup for 100%. The MFC dialog editor alignment operations do not work correctly on the 125% monitor but work fine on the 100% monitor. It would appear Microsoft isn't properly handling DPI in the dialog editor.

How to create an Evernote kind of widget for global menu of a MacOS/X desktop using QT?

How to create an application which stays in top of MacOS, something similar to below image. You can see the Evernote elephant icon.
I don't want to use xcode - because my application already built in QT, it has nice GUI, now I wanted to add extended feature something similar to Evernote. If I click on an elephant it will open a dialog box to write notes. In my case- it's a simple event like on/off buttons.
I have tried and created GUI widget apps but how to make one which resides like Evernote app ?
A custom pop up menu like the one pictured can be done several ways in Qt.
QML is the most modern way of making the menu with the customized styling you are looking for.
Apply the appropriate flags to the window/widget so it appears as a popup.
The same effects can also be done in QWidgets, but takes more code and probably will take longer to make. The flags you are looking for will be found under Qt Window Flags and/or under Qt Widget Attributes.
The stock stylings for Qt for different OS's deal mostly with title bars, status bars, buttons, drop downs, etc.
The base styles for Mac can be found here:
http://doc.qt.io/qt-5/gallery-macintosh.html
Once you go to a customized popup, you have to draw all of it yourself... but the native drawing elements in Qt are friendly enough and get you that look you are trying to do.
There are even some tools for exporting from Photoshop or Gimp directly to QML.
http://doc.qt.io/qtcreator/quick-export-to-qml.html
Hope that helps.
You are looking for a tray icon. Qt implements it in QSystemTrayIcon.
Further information
You may take a look at the System Tray Icon Example.
Many StackOverflow posts exist on this topic.
If you already have a program written for Qt, then you can compile and run it under MacOS/X much the same way you could compile it under (whatever OS you're using now). You'll need to install Xcode because Xcode includes the C++ compiler (clang) you'll need in order to compile your Qt program, but you don't have to use the Xcode IDE if you don't want to. Rather, you can either use the QtCreator IDE under MacOS/X, or you can simply open up a Terminal window and do a "qmake ; make" in the directory where your Qt-based program's .pro file is, and build it from the command line that way.
If, on the other hand, your question is actually about how to add an icon to the global menu of a MacOS/X desktop, then I don't think Qt has an API for that, so you'll need to drop down to using one of MacOS/X's native APIs. That will probably involve learning some Objective-C (or Objective-C++, if you prefer), but integrating a bit of Objective-C/C++ into your Qt app is doable with a bit of work.

What desktop does Metro stuff run in?

Just curious, from a standpoint of WinAPI developer, what desktop do Metro apps run in?
This stuff:
I didn't know that it would be such a secret... so I had to do some investigating and here's what I found:
First off, to answer my original question -- the Metro (or Modern UI) stuff runs in the exact same desktop as the "desktop" apps (pardon the pun.) It is actually all very simple. The short answer -- all Microsoft approved Metro stuff runs in the Internet Explorer_Server container (which, in layman's terms, is the Internet Explorer); or in the DirectUIHWND container (which is Microsoft's proprietary class that renders their undocumented UI), all in windows with the WS_EX_TOPMOST style turned on, which makes them render on top of the other content. And that is it!
Here's a couple of examples:
Let's split the desktop and use Spy++ to see what's happening under the hood:
So if we look into the "Weather" app window, it is nothing more than the regular (Win32) window of the class "Internet Explorer_Server" that is housed in the window of the "Web Platform Embedding" class, which in turn sits in the "Windows.UI.Core.CoreWindow" container that has the WS_EX_TOPMOST and WS_EX_NOREDIRECTIONBITMAP styles on:
If you look even deeper, all Microsoft's Metro stuff seems to run from the WWAHOST.exe process, which in simple terms is the container to run JavaScript for the Metro apps.
Now let's look into the Start Screen itself. Since it completely covers the desktop we need to use a different tool and its Shift key snapshot capability to get to it:
From it we can get the Start Screen's window handle (or 0x10158 in my case) and look it up in the Spy++:
As you can see from both tools, the Start Screen has window class DirectUIHWND, that is housed inside a window of the ImmersiveLauncher class, that is the one with the WS_EX_TOPMOST and WS_EX_NOREDIRECTIONBITMAP styles that make it remain on top. And that is the only difference between it and any other window created by a "desktop" app.
What is also interesting is how the "desktop" itself is rendered in case of a split-window situation. I originally assumed that in this case the desktop is simply shifted (or moved) to one side and resized, but that is not what happens... In reality (or in my Windows 8.1) in case of a split between a desktop and a Metro app, the metro app simply covers over the desktop, but the desktop itself does not change its position or size. In that case, only the taskbar and the existing desktop windows are moved and resized to fit the split. This could be illustrated by this diagram:
As a side note, such moving and resizing can be quite annoying for a user, since original positions and sizes of the desktop windows are not restored when the split goes away.
And lastly, a somewhat unexpected finding. I decided to check how Google folks were able to implement their Chrome browser (running as a Metro app) and found this:
Chrome renders in the Windows.UI.Core.CoreWindow class window, belonging to the Google's own process: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe". So without going any deeper, it is evidently possible to encapsulate a Metro-style app in a non-Microsoft container, which is a good news for developers that don't care about AppStore XAML apps :)
EDIT: Forgot to mention, if you plan to show your own popup message from a Win32 process that is visible on top of a Metro app, you need to do the following:
Set UIAccess="true" in the process manifest. You can do so in the Visual Studio by going to Project Properties -> Linker -> Manifest Files and set UAC Bypass UI Protection to YES. (Note that you can keep UAC Execution Level as asInvoker, or not to require elevation of your process.)
Code-sign your process. It is important, since without a signature it won't work, and you'll see this error message: "A referral was returned from the server."
An alternative to signing (or for testing purposes on your development system) you can set the following registry key to 0. (I haven't tried it though, and I wouldn't recommend it due to obvious security concerns! But it seems to be another way to test it if a code-signing certificate is not available.)
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\ValidateAdminCodeSignatures
Place the compiled executable file either into the %windir%\System32 folder, or more realistically into the %ProgramFiles%\Company\Product, or into the alternative %ProgramFiles(X86)%\Company\Product folder for your product's installation location.
Also you may consider reading Raymond Chen's article about this topic.
After that, when you set the WS_EX_TOPMOST style on your popup window, it will be displayed above any other windows, including the Metro apps, Start Screen, etc.
So in other words, doing this:
//You may also consider setting the WS_EX_NOACTIVATE style
::SetWindowPos(hWnd, HWND_TOPMOST, 0, 0 , 0, 0, SWP_NOMOVE | SWP_NOSIZE);
Can achieve this:
Since you say that your actual issue is knowing whether a Metro app is running, the answer is to call IAppVisibility::GetAppVisibilityOnMonitor. Pass the monitor you want to check. Note that this will give the correct answer regardless of what desktop the applications run in.

Can a QT window be completely styled, including the menu bar when running on Windows 7 or Vista?

I noticed that the sample apps from QT show their menu bar as opaque, and with a color that doesn't match any of the styling on the window. It seems as if the windows being created by QT when running on Vista or Windows 7 don't pick up the translucency that are no the mainstay of the new Windows look and feel. Is there a way to override this in QT, or even have a custom painted menu?
On Windows 7 there is a special flag that activates the "Glass" Look&Feel:
Here is some more detailed information:
http://labs.trolltech.com/blogs/2009/09/15/using-blur-behind-on-windows/
Screenshot http://labs.trolltech.com/blogs/wp-content/uploads/2009/09/blurbehind2.png
From what I see, only the Qt::WA_TranslucentBackground flag is involved.
All of my Qt applications look native on Vista/Win7, including the "glass" frame. This is all by default.
I must admit I don't know where you got this idea that they don't. Here's what the Browser demo that comes with Qt looks like on my Win7 machine.
alt text http://img28.imageshack.us/img28/5535/qtacrossplatformapplica.png
I can't see anything wrong with it.

Carbide / Symbian C++ - Change Application Icon

I am using Carbide (just upgraded to 2.0) to develop an S60 3rd Edition application.
I would like to know the easiest way to change the icon (both the application icon on the device menu and the icon at the top left of the main view) because I have the need to skin my application in many different ways as easily as possible.
All my efforts with messing around with .mif files have so far failed. I have a 44x44 .svg icon I made with Illustrator, could someone please help me in the right direction?
Thanks!
To change the app icon when you run your app use (in the status bar):
CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
CAknContextPane* cp=(CAknContextPane *)sp->ControlL(TUid::Uid(EEikStatusPaneUidContext));
_LIT(KContextBitMapFile, "my_bitmap_file.mbm");
CFbsBitmap* bitmap = iEikonEnv->CreateBitmapL(KContextBitMapFile, EMbmBitmap);
CleanupStack::PushL(bitmap);
CFbsBitmap* bitmapmask = iEikonEnv->CreateBitmapL(KContextBitMapFile, EMbmBitmapMask);
CleanupStack::PushL(bitmapmask);
cp->SetPicture(bitmap, bitmapmask);
CleanupStack::Pop(); // bitmapmask
CleanupStack::Pop(); // bitmap
DrawNow();
I'm not aware of any possibility of changing the app icon in the menu list programmatically, other than reinstalling the app with different mif file.
If you want to change the icon in your SIS file and then overinstall it on device then you may have to reboot your device after installation - the application icon is in the Symbian cache and is not updated.
http://wiki.forum.nokia.com/index.php/CS000808_-_Creating_and_adding_an_icon_to_an_S60_3rd_Edition_application
With latest QMake and Qt SDK (4.6.2) you don't need to create any .mif file yourself. An SVG file will do.
For more detailed instructions see: How to Set Qt Application Icon and Title in Symbian S60.
Although the article uses Qt Creator, as long as you use QMake then it's the same thing.