Code Monkey home page Code Monkey logo

yousseflasheen / handy_window Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ubuntu/handy_window.dart

0.0 0.0 0.0 887 KB

Provides modern-looking Handy windows with rounded bottom corners for Flutter applications on Linux

Home Page: https://pub.dev/packages/handy_window

License: Mozilla Public License 2.0

Shell 0.16% JavaScript 0.02% C++ 0.59% Python 0.20% C 93.11% Emacs Lisp 0.01% Dart 0.16% CSS 3.46% CMake 0.56% SCSS 0.88% Meson 0.85%

handy_window's Introduction

Handy Window

pub

This package enhances the looks of Flutter applications on Linux by providing modern-looking Handy windows with rounded bottom corners.

Handy window Flutter window

NOTE: Handy windows are only available on Ubuntu 20.04 (GLib >= 2.58) and later.

Usage

Add the dependency to pubspec.yaml:

dependencies:
  handy_window:

Modify linux/my_application.cc to register plugins before showing the Flutter window and view:

diff --git a/linux/my_application.cc b/linux/my_application.cc
index fa74baa..3133755 100644
--- a/linux/my_application.cc
+++ b/linux/my_application.cc
@@ -48,17 +48,17 @@ static void my_application_activate(GApplication* application) {
   }
 
   gtk_window_set_default_size(window, 1280, 720);
-  gtk_widget_show(GTK_WIDGET(window));
 
   g_autoptr(FlDartProject) project = fl_dart_project_new();
   fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
 
   FlView* view = fl_view_new(project);
-  gtk_widget_show(GTK_WIDGET(view));
   gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
 
   fl_register_plugins(FL_PLUGIN_REGISTRY(view));
 
+  gtk_widget_show(GTK_WIDGET(window));
+  gtk_widget_show(GTK_WIDGET(view));
   gtk_widget_grab_focus(GTK_WIDGET(view));
 }

handy_window's People

Contributors

jpnurmi avatar feichtmeier avatar jgmgit avatar kenvandine avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.