Skip to content

Instantly share code, notes, and snippets.

View ZanyXDev's full-sized avatar
💭
99 little bugs in the code. Take 1 down, patch it around, 117 bugs in the code

Zany XDev ZanyXDev

💭
99 little bugs in the code. Take 1 down, patch it around, 117 bugs in the code
View GitHub Profile
@Imater
Imater / tomat.sh
Last active July 17, 2025 20:17
> tomat 25 'Название дела'
#!/usr/bin/env bash
SLEEP_DURATION=${SLEEP_DURATION:=1} # default to 1 second, use to speed up tests
progress-bar() {
local duration
local columns
local space_available
local fit_to_screen
local space_reserved
@alex-spataru
alex-spataru / A QML Material Drawer.md
Last active August 8, 2024 02:04
Implementation of a simple and clean Material drawer for your QtQuick/QML applications

Description

This gist allows you to implement a material drawer easily for your projects. It consists of three files:

  • PageDrawer.qml The drawer itself, with an icon viewer, a list view and some hacks to execute the actions/functions assigned to each drawer item
  • DrawerItem.qml Which can act as an action, a spacer, a separator or a link
  • SvgImage.qml Ugly hack to make SVG images look crisp and smooth on HDPI screens

Licence

This code is released under the WTFPL, for more information click here.

Orientation overview in Qt

Terms

  • Auto-rotation: the process where the platform will read sensor data about the physical screen orientation and apply that to the screen properties, so that eg. a screen in a physical landscape orientation will have an observable width > height.
  • Orientation-lock: More or less granular configuration of which orientations the platform is allowed to auto-rotate into

APIs

  • QScreen::nativeOrienation: the fixed standard-orientation of the physical screen, eg the orienation where the logo makes sense. Typically landscape for desktop screens. Never changes.