roar/libroar/RoarWindowAbout.py
Lucio Andrés Illanes Albornoz ced45fa0d4 Various bugfixes & usability improvements.
1)  Add background colour toolbar beneath (foreground) colour toolbar.
2)  Add colour flipping command w/ {accelerator,{menu,toolbar} item}.
3)  Add {de,in}crease {brush,canvas} size accelerator.
4)  Add {hide,show} assets window toolbar item.
5)  Circle tool: draw outline with foreground colour.
6)  Circle tool: honour transparency.
7)  Fill tool: change comprehensive fill modifier key from <Shift> to <Ctrl>.
8)  Fill tool: fill with {back,fore}ground colour given <[RL]MB>
9)  Fix arrow keys cursor motion when scrolled down.
10  Instantly reflect {brush size,colour,tool} changes in canvas.
11) Object tool: honour transparency w/ non-external objects.
12) Object tool: update selection rectangle during <LMB> whilst dragging, set w/ release of <LMB>.
13) Rectangle tool: draw outline with foreground colour.
14) Rectangle tool: honour transparency.
15) Replace wx.ToolBar() w/ wx.lib.agw.aui.AuiToolBar() & custom wx.lib.agw.aui.AuiDefaultToolBarArt().
16) Restore scrolling position after resizing canvas.

.TODO: deleted.
assets/audio/roar{arab8,spoke11}.wav: added.
assets/text/hotkeys.txt: added to document hotkeys.
assets/text/requirements.txt, requirements.txt: moved.
assets/text/TODO: updated.
{assets/tools,lib{canvas,gui,roar,rtl,tools}}/*.py: remove Vim fold markers.
libroar/RoarCanvasCommandsFile.py:_importFile(): update wx.FileDialog() message.
libroar/RoarCanvasCommandsOperators.py:canvasOperator(): update invert colours {caption,label}.
2019-09-23 18:49:33 +02:00

48 lines
2.2 KiB
Python

#!/usr/bin/env python3
#
# RoarWindowAbout.py
# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de>
#
from glob import glob
import os, random, wx, wx.adv
class RoarWindowAbout(wx.Dialog):
def onButtonRoar(self, event):
self.Destroy()
#
# __init__(self, parent, minSize=(320, 300), title="About roar")
def __init__(self, parent, minSize=(320, 300), title="About roar"):
super().__init__(parent, size=minSize, title=title)
self.panel, self.sizer, self.sizerV = wx.Panel(self), wx.FlexGridSizer(2, 2, 4, 4), wx.BoxSizer(wx.VERTICAL)
logoPathNames = glob(os.path.join("assets", "images", "logo*.bmp"))
logoPathName = logoPathNames[random.randint(0, len(logoPathNames) - 1)]
self.logo = wx.StaticBitmap(self.panel, -1, wx.Bitmap(logoPathName))
self.title = wx.StaticText(self.panel, label="roar -- mIRC art editor for Windows && Linux\n__ROAR_RELEASE_VERSION__\nhttps://www.github.com/lalbornoz/roar/\nCopyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de>", style=wx.ALIGN_CENTER)
self.title.SetFont(wx.Font(8, wx.DEFAULT, wx.NORMAL, wx.NORMAL, underline=False))
labelsText = ["&roar!", "&ROAR!", "&roaaaaaaar!", "&ROAROARAOR", "_&ROAR_"]
labelText = labelsText[random.randint(0, len(labelsText) - 1)]
self.buttonRoar = wx.Button(self.panel, label=labelText)
self.buttonRoar.Bind(wx.EVT_BUTTON, self.onButtonRoar)
self.sizerV.AddMany(((self.title, 0, wx.ALL | wx.CENTER, 4), (self.buttonRoar, 0, wx.ALL | wx.CENTER, 4),))
self.sizer.AddMany((
(self.logo, 0, wx.ALL | wx.CENTER, 4),
(self.sizerV, 0, wx.ALL | wx.CENTER, 3),))
self.panel.SetSizerAndFit(self.sizer)
self.SetClientSize(self.sizer.ComputeFittingClientSize(self)); self.Center();
self.SetTitle(title)
soundBitePathNames = glob(os.path.join("assets", "audio", "roar*.wav"))
soundBitePathName = soundBitePathNames[random.randint(0, len(soundBitePathNames) - 1)]
self.soundBite = wx.adv.Sound(soundBitePathName)
if self.soundBite.IsOk():
self.soundBite.Play(wx.adv.SOUND_ASYNC)
self.ShowModal()
# vim:expandtab foldmethod=marker sw=4 ts=4 tw=120