SlideShare a Scribd company logo
Themes, shells and other
       animals
Themes
   Plasma graphics is heavily based on the
    Svg standard
   Easily themeable
   Architecture indipendence
   Basis for resolution indipendence
   High level of abstraction from an API
    standpoint
Using Svgs from themes
   They are installed in the KDE prefix/share/
    apps/desktopthemes/themeName
   Subfolders: dialogs, widgets, applet
    names, opaque, locolor
   Loading them:
           Plasma::Theme abstracts the loading of the proper
              path, with proper fallbacks
           m_svg->setImagePath(“widgets/background”);
From packages
   A scripted applet can load a svg from its
    own package with Package::filePath()
           In javascript you do
              plasmoid.findSvg(“foo”)
           Will search foo.svg(z) in the images
             subfolder of your plasmoid
Some advices
   Try to use graphics from the theme and
    default widgets as much as possible
   Install your own graphics (c++ case) or use
    from the package (scripted case) only
    when really necessary
   Try to make visually work your additional
    graphic with different themes (at least dark
    vs light)
Implementation details:
            Plasma::Svg
   The central machinery that renders svgs,
    eases use of QSvgRenderer
   Several optimizations (a renderer is quite
    heavy):
           Shared: for each svg file a single shared
             renderer
           Cached: saves rendered svgs on disk:
             avoids completely creation of renderers
             in some cases
   Use it: several paint() functions, takes a
    Qpainter as argument
Plasma::FrameSvg
           Most Plasma theme
            elements style mostly-
            rectangular widgets
           Svg is scalable, but...
            not so much :)
           We want to keep the
            radius of rounded
            borders intact and each
            element exactly aligned
            to the pixel grid
           Plasma::FrameSvg
            comes to rescue
From a graphics standpoint
            We have svgs made of 9
             elements: center, edges and
             corners
            The center can be scaled as
             ve wish
            Corners are NEVER scaled
            Horizontal edges are scaled
             in the x axis, vertical in the y
             axis instead
From a code standpoint
   FrameSvg is a subclass of Svg, so usual
    setImagePath()
   ResizeFrame scales the final composition
    with said rules
   PaintFrame() paints the whole composition
   A svg can have multiple sets of 9 elements
    sets, with a different prefix in their name,
    switch with setElementPrefix()
Part 2: shells - Plasma-mid
   Plasma-mid is an experimental interface for
    mobile internet devices and other
    contrained little devices.
   Work began at Akademy-2008, mostly by
    Aaron, some work by Sebas in mid-specific
    containments, some patches by me and i'm
    forgetting somebody, sorry :)
   The improved sytem-tray we have now
    actually derives from toughts and design
    around plasma-mid
Plasma-mid
   What does work
          Plasma-mid is a barebone plasma app with a
             main view and a panel view in the same window
          Loads correctly applet layouts from config files
          Supports panels in the 4 locations
          The main view can correctly switch containment
   What does not
          More than 1 panel
          Any configuration interface, hand editing
             configuration files is necessary
One size fits.. not much
   Different devices with different hardware
    capabilities will need to have a different-
    looking interface.. different applets layout
    same app
   Touchscreen or not, keyboard and mouse
    or not, makes needed stuff and Fitt's laws
    slightly different
   Also, a really tiny single-purpose device
    could have just plasma, a more general
    one like the Eee mixes up plasma and
    traditional apps
Current demo
   A plasma-based interface that mostly
    manages traditional apps
   Right vertical panel thumb friendly with an
    activitybar, an “activewindow”, a sytemtray
    and a clock
   3 activities: an icon list to launch apps, a
    fullscreen taskbar and a traditional widgets
    space
   Ideally the windowmanager would have to
    be very barebone, even more than
    matchbox
Current demo
   It's a full screen non-desktop window, with
    the panel area reserved, so clicking on the
    panel brings the plasma interface on top
   Both the panel and the main screen
    containments are simplified mid-oriented
    code
   It's done with already existing applets,
    maybe not really adapt and not so pretty
    but we have a basic working thing from
    where we can start to build something
Media center
   Current media center solutions are
    applications that aims to turn a pc in an
    easy attach-to-your-tv single purpose box
   The charateristics of Plasma we're
    developing both in terms of good looking ui
    and network services transparency would
    make this possible, but...
We can do more than that
   Blend media center related stuff and the
    traditional desktop (media center activity?)
   Control a media center from an another
    machine with your plasma desktop (or
    even your plasma-mid portable device ;)
   Scripted widgets to control the media could
    be sent across the network
   Anything ele that can't think about now
What there is now...
    ...And what realistically i would like to get in
    KDE 4.3:
   A video widget in libplasma usable even
    with few lines of javascript
   A media player plasmoid with basic
    audio/video playback capabilities and a
    dbus interface to be remote controlled
Questions?

More Related Content

PPS
Thiền Triết lý Phật
PPS
Z pohadkovych krajin
PDF
Vocab Unidad 1.1
PDF
KDE 4.1 Plasma widgets
PPS
Letni procházka s Ferdou 1
PDF
Marketing intelligence assessment
PDF
Tokamak 4: KDE Plasma Netbook
PPT
Smart Evaluation Considerations
Thiền Triết lý Phật
Z pohadkovych krajin
Vocab Unidad 1.1
KDE 4.1 Plasma widgets
Letni procházka s Ferdou 1
Marketing intelligence assessment
Tokamak 4: KDE Plasma Netbook
Smart Evaluation Considerations

Viewers also liked (10)

PDF
Campkde 2010: KDE Plasma netbook
PPS
Graphics Art 1
PDF
Akademy 2010 presentation
PDF
URSI 2008
PPS
Krasne fotky a vtipy
PDF
Vocab 1.3
PPS
Podzimni prochazka s Ferdou 2
PPS
farm Animals
PPS
10 10 How To Protect Your Bank Card
POT
Kinder ppp numbers from 50 59
Campkde 2010: KDE Plasma netbook
Graphics Art 1
Akademy 2010 presentation
URSI 2008
Krasne fotky a vtipy
Vocab 1.3
Podzimni prochazka s Ferdou 2
farm Animals
10 10 How To Protect Your Bank Card
Kinder ppp numbers from 50 59
Ad

Similar to Tokamak2: themes and netbook shell (20)

PDF
KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...
PDF
What's up about Plasma-MID?
PDF
Plasmaquick Workshop - FISL 13
PDF
KDE Plasma Develop Intro
PDF
Quick and Dirty GUI Applications using GUIDeFATE
PDF
KDE Plasma for Mobile Phones
PPT
Implementation
PPTX
East Coast DevCon 2014: The Slate UI Framework - Architecture & Tools
PDF
The Unusual Suspect: Layouts for sleeker KDE applications
PDF
GUI toolkits comparison for python
ODP
Amazing KDE (K Desktop Environment)
ODP
(2) gui drawing
PDF
Sketching in Code
PPT
Rich User Interaction with SVG
PDF
The Unusual Suspect: Layouts for sleeker KDE applications
ODP
PDF
PDF
PDF
Plasma Animations Overview (aka. Pimp my Plasmoids!)
PDF
COMP 4026 Lecture4: Processing and Advanced Interface Technology
KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...
What's up about Plasma-MID?
Plasmaquick Workshop - FISL 13
KDE Plasma Develop Intro
Quick and Dirty GUI Applications using GUIDeFATE
KDE Plasma for Mobile Phones
Implementation
East Coast DevCon 2014: The Slate UI Framework - Architecture & Tools
The Unusual Suspect: Layouts for sleeker KDE applications
GUI toolkits comparison for python
Amazing KDE (K Desktop Environment)
(2) gui drawing
Sketching in Code
Rich User Interaction with SVG
The Unusual Suspect: Layouts for sleeker KDE applications
Plasma Animations Overview (aka. Pimp my Plasmoids!)
COMP 4026 Lecture4: Processing and Advanced Interface Technology
Ad

Recently uploaded (20)

PPT
Geologic Time for studying geology for geologist
PPTX
Tartificialntelligence_presentation.pptx
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
CloudStack 4.21: First Look Webinar slides
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
A review of recent deep learning applications in wood surface defect identifi...
PPTX
Modernising the Digital Integration Hub
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PPTX
observCloud-Native Containerability and monitoring.pptx
PPTX
The various Industrial Revolutions .pptx
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
Five Habits of High-Impact Board Members
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PDF
Architecture types and enterprise applications.pdf
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
DP Operators-handbook-extract for the Mautical Institute
Geologic Time for studying geology for geologist
Tartificialntelligence_presentation.pptx
Assigned Numbers - 2025 - Bluetooth® Document
CloudStack 4.21: First Look Webinar slides
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
A contest of sentiment analysis: k-nearest neighbor versus neural network
NewMind AI Weekly Chronicles – August ’25 Week III
A review of recent deep learning applications in wood surface defect identifi...
Modernising the Digital Integration Hub
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
sustainability-14-14877-v2.pddhzftheheeeee
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
observCloud-Native Containerability and monitoring.pptx
The various Industrial Revolutions .pptx
Module 1.ppt Iot fundamentals and Architecture
Five Habits of High-Impact Board Members
O2C Customer Invoices to Receipt V15A.pptx
Architecture types and enterprise applications.pdf
A comparative study of natural language inference in Swahili using monolingua...
DP Operators-handbook-extract for the Mautical Institute

Tokamak2: themes and netbook shell

  • 1. Themes, shells and other animals
  • 2. Themes  Plasma graphics is heavily based on the Svg standard  Easily themeable  Architecture indipendence  Basis for resolution indipendence  High level of abstraction from an API standpoint
  • 3. Using Svgs from themes  They are installed in the KDE prefix/share/ apps/desktopthemes/themeName  Subfolders: dialogs, widgets, applet names, opaque, locolor  Loading them:  Plasma::Theme abstracts the loading of the proper path, with proper fallbacks  m_svg->setImagePath(“widgets/background”);
  • 4. From packages  A scripted applet can load a svg from its own package with Package::filePath()  In javascript you do plasmoid.findSvg(“foo”)  Will search foo.svg(z) in the images subfolder of your plasmoid
  • 5. Some advices  Try to use graphics from the theme and default widgets as much as possible  Install your own graphics (c++ case) or use from the package (scripted case) only when really necessary  Try to make visually work your additional graphic with different themes (at least dark vs light)
  • 6. Implementation details: Plasma::Svg  The central machinery that renders svgs, eases use of QSvgRenderer  Several optimizations (a renderer is quite heavy):  Shared: for each svg file a single shared renderer  Cached: saves rendered svgs on disk: avoids completely creation of renderers in some cases  Use it: several paint() functions, takes a Qpainter as argument
  • 7. Plasma::FrameSvg  Most Plasma theme elements style mostly- rectangular widgets  Svg is scalable, but... not so much :)  We want to keep the radius of rounded borders intact and each element exactly aligned to the pixel grid  Plasma::FrameSvg comes to rescue
  • 8. From a graphics standpoint  We have svgs made of 9 elements: center, edges and corners  The center can be scaled as ve wish  Corners are NEVER scaled  Horizontal edges are scaled in the x axis, vertical in the y axis instead
  • 9. From a code standpoint  FrameSvg is a subclass of Svg, so usual setImagePath()  ResizeFrame scales the final composition with said rules  PaintFrame() paints the whole composition  A svg can have multiple sets of 9 elements sets, with a different prefix in their name, switch with setElementPrefix()
  • 10. Part 2: shells - Plasma-mid  Plasma-mid is an experimental interface for mobile internet devices and other contrained little devices.  Work began at Akademy-2008, mostly by Aaron, some work by Sebas in mid-specific containments, some patches by me and i'm forgetting somebody, sorry :)  The improved sytem-tray we have now actually derives from toughts and design around plasma-mid
  • 11. Plasma-mid  What does work  Plasma-mid is a barebone plasma app with a main view and a panel view in the same window  Loads correctly applet layouts from config files  Supports panels in the 4 locations  The main view can correctly switch containment  What does not  More than 1 panel  Any configuration interface, hand editing configuration files is necessary
  • 12. One size fits.. not much  Different devices with different hardware capabilities will need to have a different- looking interface.. different applets layout same app  Touchscreen or not, keyboard and mouse or not, makes needed stuff and Fitt's laws slightly different  Also, a really tiny single-purpose device could have just plasma, a more general one like the Eee mixes up plasma and traditional apps
  • 13. Current demo  A plasma-based interface that mostly manages traditional apps  Right vertical panel thumb friendly with an activitybar, an “activewindow”, a sytemtray and a clock  3 activities: an icon list to launch apps, a fullscreen taskbar and a traditional widgets space  Ideally the windowmanager would have to be very barebone, even more than matchbox
  • 14. Current demo  It's a full screen non-desktop window, with the panel area reserved, so clicking on the panel brings the plasma interface on top  Both the panel and the main screen containments are simplified mid-oriented code  It's done with already existing applets, maybe not really adapt and not so pretty but we have a basic working thing from where we can start to build something
  • 15. Media center  Current media center solutions are applications that aims to turn a pc in an easy attach-to-your-tv single purpose box  The charateristics of Plasma we're developing both in terms of good looking ui and network services transparency would make this possible, but...
  • 16. We can do more than that  Blend media center related stuff and the traditional desktop (media center activity?)  Control a media center from an another machine with your plasma desktop (or even your plasma-mid portable device ;)  Scripted widgets to control the media could be sent across the network  Anything ele that can't think about now
  • 17. What there is now... ...And what realistically i would like to get in KDE 4.3:  A video widget in libplasma usable even with few lines of javascript  A media player plasmoid with basic audio/video playback capabilities and a dbus interface to be remote controlled