WidgetApplication now hosts the root inside an ApplicationFrame whose menu bar sits above the content and carries the window controls; applications fill it through menuBar() or turn it off with setMenuBarVisible(false). The gallery and leo, which build their own bars, opt out. Unfocused keys go to the root's default key target, so shortcuts still reach the content inside the frame.
22 lines
361 B
C++
22 lines
361 B
C++
#include "Gallery.hpp"
|
|
#include "WidgetApplication.hpp"
|
|
|
|
using namespace tp;
|
|
using namespace tp::ui;
|
|
|
|
class GalleryApplication : public WidgetApplication {
|
|
public:
|
|
GalleryApplication() {
|
|
setMenuBarVisible(false);
|
|
setRoot(mGallery);
|
|
}
|
|
|
|
private:
|
|
gallery::Gallery mGallery;
|
|
};
|
|
|
|
int main() {
|
|
GalleryApplication application;
|
|
application.run();
|
|
return 0;
|
|
}
|