Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Nick@NICK-PC MINGW64 ~/GCI/sugar
- $ git clone https://github.com/ndefilippis/sugar-toolkit-gtk3.git
- Cloning into 'sugar-toolkit-gtk3'...
- remote: Counting objects: 36123, done.
- remote: Total 36123 (delta 0), reused 0 (delta 0), pack-reused 36123
- Receiving objects: 100% (36123/36123), 13.58 MiB | 1024.00 KiB/s, done.
- Resolving deltas: 100% (20448/20448), done.
- Checking connectivity... done.
- Nick@NICK-PC MINGW64 ~/GCI/sugar
- $ git add .
- fatal: Not a git repository (or any of the parent directories): .git
- Nick@NICK-PC MINGW64 ~/GCI/sugar
- $ cd sugar-toolkit-gtk3
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
- $ git add .
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
- $ git commit -m "Write documentation for sugar3.graphics.style"
- [master 8798b08] Write documentation for sugar3.graphics.style
- 1 file changed, 60 insertions(+), 7 deletions(-)
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
- $ git push origin master
- Counting objects: 6, done.
- Delta compression using up to 8 threads.
- Compressing objects: 100% (6/6), done.
- Writing objects: 100% (6/6), 1.26 KiB | 0 bytes/s, done.
- Total 6 (delta 4), reused 0 (delta 0)
- To https://github.com/ndefilippis/sugar-toolkit-gtk3.git
- 7ba120f..8798b08 master -> master
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
- $ git add .
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
- $ git commit -m "Write documentation for sugar3.graphics.style"
- [master 986cf22] Write documentation for sugar3.graphics.style
- 1 file changed, 31 insertions(+), 31 deletions(-)
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
- $ git rebase -i master
- Successfully rebased and updated refs/heads/master.
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
- $ git rebase -i HEAD~2 master
- [detached HEAD 95bb3c0] Write documentation for sugar3.graphics.style
- Date: Sun Dec 27 18:39:43 2015 -0500
- 1 file changed, 60 insertions(+), 7 deletions(-)
- Successfully rebased and updated refs/heads/master.
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
- $
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
- $ git push origin master
- To https://github.com/ndefilippis/sugar-toolkit-gtk3.git
- ! [rejected] master -> master (non-fast-forward)
- error: failed to push some refs to 'https://github.com/ndefilippis/sugar-toolkit-gtk3.git'
- hint: Updates were rejected because the tip of your current branch is behind
- hint: its remote counterpart. Integrate the remote changes (e.g.
- hint: 'git pull ...') before pushing again.
- hint: See the 'Note about fast-forwards' in 'git push --help' for details.
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
- $ git pull
- Auto-merging src/sugar3/graphics/style.py
- CONFLICT (content): Merge conflict in src/sugar3/graphics/style.py
- Automatic merge failed; fix conflicts and then commit the result.
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master|MERGING)
- $ git add .
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master|MERGING)
- $ git log
- commit 95bb3c0979b4db2fed225107b6b1cc333183b853
- Author: radicalonion <ndefilippis98@gmail.com>
- Date: Sun Dec 27 18:39:43 2015 -0500
- Write documentation for sugar3.graphics.style
- commit 7ba120fe25eab020af3e0bd9ff51d3862407e0ac
- Author: James Cameron <quozl@laptop.org>
- Date: Mon Dec 21 14:18:28 2015 +1100
- Fix persistent tree view palettes
- A rework of the TreeViewInvoker used by the journal and activity list.
- Fixes a persistent journal entry palette that reappears in journal or
- home view. https://bugs.sugarlabs.org/ticket/4918
- Also fixes an over-sensitive journal icon; with the journal mostly
- empty, rapidly move the mouse from the bottom of the screen into the
- lowest icon and then out again. Before this patch, the palette was
- shown. After this patch, the mouse must rest in the icon.
- Changes made:
- - override _ensure_palette_exists in parent class Invoker,
- - remove reference to MouseSpeedDetector, it is no longer required,
- - remove enter and leave events; they are for the TreeView as a whole,
- and are not required,
- - properly detect that None is returned by get_path_at_pos, when the
- coordinates are outside the TreeView cells.
- Not fixed:
- - moving the mouse out of the journal icon invoker does not popdown the
- palette, but it does when moving the mouse out of the activity icon in
- the activity list; so this is a problem beyond the invoker,
- Tested on Fedora 18 and Ubuntu 15.10.
- Test cases:
- - check a click will activate item,
- - check a right-click will show palette,
- - check a mouse hover will show palette,
- - check a brief mouse passing will not show palette,
- - check if mouse leaving palette will popdown.
- commit b1386665b11f6e6246963cffbe811bafbfb9bae3
- Merge: e3b61a0 c75655a
- Author: Sam Parkinson <sam@sam.today>
- Date: Sun Dec 20 17:21:01 2015 +1100
- Merge branch 'master' of https://github.com/mjuvekar7/sugar-toolkit-gtk3
- commit e3b61a0ee0350ba1454d0d21ac73b8150d78dee4
- Merge: 739dacb ae80df7
- Author: Gonzalo Odiard <godiard@gmail.com>
- Date: Wed Dec 16 06:37:08 2015 -0500
- Merge pull request #278 from quozl/2015-12-15-icon-size
- Fix remaining icon_size references
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master|MERGING)
- $ uit
- bash: uit: command not found
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master|MERGING)
- $ git log
- commit 95bb3c0979b4db2fed225107b6b1cc333183b853
- Author: radicalonion <ndefilippis98@gmail.com>
- Date: Sun Dec 27 18:39:43 2015 -0500
- Write documentation for sugar3.graphics.style
- commit 7ba120fe25eab020af3e0bd9ff51d3862407e0ac
- Author: James Cameron <quozl@laptop.org>
- Date: Mon Dec 21 14:18:28 2015 +1100
- Fix persistent tree view palettes
- A rework of the TreeViewInvoker used by the journal and activity list.
- Fixes a persistent journal entry palette that reappears in journal or
- home view. https://bugs.sugarlabs.org/ticket/4918
- Also fixes an over-sensitive journal icon; with the journal mostly
- empty, rapidly move the mouse from the bottom of the screen into the
- lowest icon and then out again. Before this patch, the palette was
- shown. After this patch, the mouse must rest in the icon.
- Changes made:
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master|MERGING)
- $ git add .
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master|MERGING)
- $ git push origin master
- To https://github.com/ndefilippis/sugar-toolkit-gtk3.git
- ! [rejected] master -> master (non-fast-forward)
- error: failed to push some refs to 'https://github.com/ndefilippis/sugar-toolkit-gtk3.git'
- hint: Updates were rejected because the tip of your current branch is behind
- hint: its remote counterpart. Integrate the remote changes (e.g.
- hint: 'git pull ...') before pushing again.
- hint: See the 'Note about fast-forwards' in 'git push --help' for details.
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master|MERGING)
- $ git pull origin master
- error: You have not concluded your merge (MERGE_HEAD exists).
- hint: Please, commit your changes before merging.
- fatal: Exiting because of unfinished merge.
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master|MERGING)
- $ git merge --abort
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
- $ git push origin master
- To https://github.com/ndefilippis/sugar-toolkit-gtk3.git
- ! [rejected] master -> master (non-fast-forward)
- error: failed to push some refs to 'https://github.com/ndefilippis/sugar-toolkit-gtk3.git'
- hint: Updates were rejected because the tip of your current branch is behind
- hint: its remote counterpart. Integrate the remote changes (e.g.
- hint: 'git pull ...') before pushing again.
- hint: See the 'Note about fast-forwards' in 'git push --help' for details.
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
- $ git pull origin master
- From https://github.com/ndefilippis/sugar-toolkit-gtk3
- * branch master -> FETCH_HEAD
- Auto-merging src/sugar3/graphics/style.py
- CONFLICT (content): Merge conflict in src/sugar3/graphics/style.py
- Automatic merge failed; fix conflicts and then commit the result.
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master|MERGING)
- $ git remote -v
- origin https://github.com/ndefilippis/sugar-toolkit-gtk3.git (fetch)
- origin https://github.com/ndefilippis/sugar-toolkit-gtk3.git (push)
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master|MERGING)
- $ git merge --abort
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
- $ git add .
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
- $ git commit -m "Write documentation for sugar3.graphics.style"
- On branch master
- Your branch and 'origin/master' have diverged,
- and have 1 and 1 different commit each, respectively.
- (use "git pull" to merge the remote branch into yours)
- nothing to commit, working directory clean
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
- $ https://github.com/sugarlabs/sugar-toolkit-gtk3.git"
- > ^C
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
- $ git remote add sugarlabs https://github.com/sugarlabs/sugar-toolkit-gtk3.git
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
- $ git fetch sugar labs
- fatal: 'sugar' does not appear to be a git repository
- fatal: Could not read from remote repository.
- Please make sure you have the correct access rights
- and the repository exists.
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
- $ git fetch sugarlabs
- remote: Counting objects: 18, done.
- remote: Total 18 (delta 12), reused 12 (delta 12), pack-reused 6
- Unpacking objects: 100% (18/18), done.
- From https://github.com/sugarlabs/sugar-toolkit-gtk3
- * [new branch] ActivityDocStrings2 -> sugarlabs/ActivityDocStrings2
- * [new branch] html -> sugarlabs/html
- * [new branch] html2 -> sugarlabs/html2
- * [new branch] master -> sugarlabs/master
- * [new branch] po -> sugarlabs/po
- * [new branch] revert-276-2015-12-15-icon-size -> sugarlabs/revert-276-2015-12-15-icon-size
- * [new branch] review -> sugarlabs/review
- * [new branch] silbe-rework-20111122 -> sugarlabs/silbe-rework-20111122
- * [new branch] silbe-rework-20111205 -> sugarlabs/silbe-rework-20111205
- * [new branch] sucrose-0.100 -> sugarlabs/sucrose-0.100
- * [new branch] sucrose-0.102 -> sugarlabs/sucrose-0.102
- * [new branch] sucrose-0.104 -> sugarlabs/sucrose-0.104
- * [new branch] sucrose-0.106 -> sugarlabs/sucrose-0.106
- * [new branch] sucrose-0.96 -> sugarlabs/sucrose-0.96
- * [new branch] sucrose-0.98 -> sugarlabs/sucrose-0.98
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
- $ git checkout -b styledocs sugarlabs/master
- Branch styledocs set up to track remote branch master from sugarlabs.
- Switched to a new branch 'styledocs'
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
- $ git branch
- master
- * styledocs
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
- $ git log
- commit 51057baef5efe147c00c552f2be42dc77f336ee8
- Author: mandarj7 <mjuvekar7@gmail.com>
- Date: Wed Dec 23 16:59:26 2015 +0530
- Add usage example to sugar3.graphics.objectchooser
- commit c95d74eab4d66eab2c7766eea6c68471223da235
- Author: mandarj7 <mjuvekar7@gmail.com>
- Date: Wed Dec 23 16:55:25 2015 +0530
- Improve docstrings in sugar3.graphics.objectchooser
- commit 264ee2b5a325b166cb8b92d6c1908bad9a1d4ed5
- Author: mandarj7 <mjuvekar7@gmail.com>
- Date: Wed Dec 23 15:31:58 2015 +0530
- Add and improve docs for sugar3.graphics.objectchooser
- commit 7ba120fe25eab020af3e0bd9ff51d3862407e0ac
- Author: James Cameron <quozl@laptop.org>
- Date: Mon Dec 21 14:18:28 2015 +1100
- Fix persistent tree view palettes
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
- $ git cherry-pick 95bb3c0979b4db2fed225107b6b1cc333183b853
- [styledocs 45b18f1] Write documentation for sugar3.graphics.style
- Date: Sun Dec 27 18:39:43 2015 -0500
- 1 file changed, 60 insertions(+), 7 deletions(-)
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
- $ git log
- commit 45b18f1f8dfde56da89fb52b73f99334ee631343
- Author: radicalonion <ndefilippis98@gmail.com>
- Date: Sun Dec 27 18:39:43 2015 -0500
- Write documentation for sugar3.graphics.style
- commit 51057baef5efe147c00c552f2be42dc77f336ee8
- Author: mandarj7 <mjuvekar7@gmail.com>
- Date: Wed Dec 23 16:59:26 2015 +0530
- Add usage example to sugar3.graphics.objectchooser
- commit c95d74eab4d66eab2c7766eea6c68471223da235
- Author: mandarj7 <mjuvekar7@gmail.com>
- Date: Wed Dec 23 16:55:25 2015 +0530
- Improve docstrings in sugar3.graphics.objectchooser
- commit 264ee2b5a325b166cb8b92d6c1908bad9a1d4ed5
- Author: mandarj7 <mjuvekar7@gmail.com>
- Date: Wed Dec 23 15:31:58 2015 +0530
- Add and improve docs for sugar3.graphics.objectchooser
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
- $ git reset --soft 51057ba
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
- $ git status
- On branch styledocs
- Your branch is up-to-date with 'sugarlabs/master'.
- Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
- modified: src/sugar3/graphics/style.py
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
- $ git commit -m "Write docs for sugar3.graphics.style"
- [styledocs 661ab91] Write docs for sugar3.graphics.style
- 1 file changed, 60 insertions(+), 7 deletions(-)
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
- $ git push origin master
- To https://github.com/ndefilippis/sugar-toolkit-gtk3.git
- ! [rejected] master -> master (non-fast-forward)
- error: failed to push some refs to 'https://github.com/ndefilippis/sugar-toolkit-gtk3.git'
- hint: Updates were rejected because a pushed branch tip is behind its remote
- hint: counterpart. Check out this branch and integrate the remote changes
- hint: (e.g. 'git pull ...') before pushing again.
- hint: See the 'Note about fast-forwards' in 'git push --help' for details.
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
- $ git pull origin master
- From https://github.com/ndefilippis/sugar-toolkit-gtk3
- * branch master -> FETCH_HEAD
- Auto-merging src/sugar3/graphics/style.py
- CONFLICT (content): Merge conflict in src/sugar3/graphics/style.py
- Automatic merge failed; fix conflicts and then commit the result.
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs|MERGING)
- $ git status
- On branch styledocs
- Your branch is ahead of 'sugarlabs/master' by 1 commit.
- (use "git push" to publish your local commits)
- You have unmerged paths.
- (fix conflicts and run "git commit")
- Unmerged paths:
- (use "git add <file>..." to mark resolution)
- both modified: src/sugar3/graphics/style.py
- no changes added to commit (use "git add" and/or "git commit -a")
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs|MERGING)
- $ git add .
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs|MERGING)
- $ git commit -m "Write docs for sugar3.graphics.style"
- [styledocs 948673d] Write docs for sugar3.graphics.style
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
- $ git push origin master
- To https://github.com/ndefilippis/sugar-toolkit-gtk3.git
- ! [rejected] master -> master (non-fast-forward)
- error: failed to push some refs to 'https://github.com/ndefilippis/sugar-toolkit-gtk3.git'
- hint: Updates were rejected because a pushed branch tip is behind its remote
- hint: counterpart. Check out this branch and integrate the remote changes
- hint: (e.g. 'git pull ...') before pushing again.
- hint: See the 'Note about fast-forwards' in 'git push --help' for details.
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
- $ git pull origin master
- From https://github.com/ndefilippis/sugar-toolkit-gtk3
- * branch master -> FETCH_HEAD
- Already up-to-date.
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
- $ git push origin master
- To https://github.com/ndefilippis/sugar-toolkit-gtk3.git
- ! [rejected] master -> master (non-fast-forward)
- error: failed to push some refs to 'https://github.com/ndefilippis/sugar-toolkit-gtk3.git'
- hint: Updates were rejected because a pushed branch tip is behind its remote
- hint: counterpart. Check out this branch and integrate the remote changes
- hint: (e.g. 'git pull ...') before pushing again.
- hint: See the 'Note about fast-forwards' in 'git push --help' for details.
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
- $ git push origin styledocs
- Counting objects: 30, done.
- Delta compression using up to 8 threads.
- Compressing objects: 100% (30/30), done.
- Writing objects: 100% (30/30), 3.71 KiB | 0 bytes/s, done.
- Total 30 (delta 20), reused 0 (delta 0)
- To https://github.com/ndefilippis/sugar-toolkit-gtk3.git
- * [new branch] styledocs -> styledocs
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
- $ git reset --soft 51057ba
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
- $ git diff --cached
- diff --git a/src/sugar3/graphics/style.py b/src/sugar3/graphics/style.py
- index d8d8589..dea88d6 100644
- --- a/src/sugar3/graphics/style.py
- +++ b/src/sugar3/graphics/style.py
- @@ -15,12 +15,14 @@
- # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- # Boston, MA 02111-1307, USA.
- -"""
- +'''
- +The style module defines constants for spacing and sizing, as well as classes for
- +Colors and Fonts. Text rendering is handled by Pango and colors are inputted by their
- +HTML code (e.g. #FFFFFFFF)
- +
- All the constants are expressed in pixels. They are defined for the XO screen
- and are usually adapted to different resolution by applying a zoom factor.
- -
- -STABLE.
- -"""
- +'''
- import os
- import logging
- @@ -36,6 +38,17 @@ ELLIPSIZE_MODE_DEFAULT = Pango.EllipsizeMode.END
- def _compute_zoom_factor():
- +<<<<<<< HEAD
- + '''
- + Calculates zoom factor based on size of screen.
- + Returns double representing fraction of maximum possible screen size
- + '''
- +=======
- + '''
- + Calculates zoom factor based on size of screen.
- + Returns double representing fraction of maximum possible screen size
- + '''
- +>>>>>>> 8798b082aa242b7c5db1fcefc7fe444d8d17c7e8
- try:
- scaling = int(os.environ.get('SUGAR_SCALING', '100'))
- return scaling / 100.0
- @@ -46,39 +59,107 @@ def _compute_zoom_factor():
- class Font(object):
- -
- +<<<<<<< HEAD
- + '''
- + A font defines the style of how the text should be rendered.
- +
- + Args:
- + desc (str): a description of the Font object
- + '''
- +=======
- + '''
- + A font defines the style of how the text should be rendered.
- +
- + Args:
- + desc (str): a description of the Font object
- + '''
- +>>>>>>> 8798b082aa242b7c5db1fcefc7fe444d8d17c7e8
- def __init__(self, desc):
- self._desc = desc
- def __str__(self):
- + '''
- + Returns description of font
- + '''
- return self._desc
- def get_pango_desc(self):
- + '''
- + Returns Pango description of font
- + '''
- return Pango.FontDescription(self._desc)
- class Color(object):
- -
- +<<<<<<< HEAD
- + '''
- + A Color object defines a specific color.
- +
- + Args:
- + color (str): String in the form #FFFFFF representing the color
- +
- + alpha (double): transparency of color
- + '''
- +=======
- + '''
- + A Color object defines a specific color.
- +
- + Args:
- + color (str): String in the form #FFFFFF representing the color
- +
- + alpha (double): transparency of color
- + '''
- +>>>>>>> 8798b082aa242b7c5db1fcefc7fe444d8d17c7e8
- def __init__(self, color, alpha=1.0):
- self._r, self._g, self._b = self._html_to_rgb(color)
- self._a = alpha
- def get_rgba(self):
- + '''
- + Returns 4-tuple of red, green, blue, and alpha levels in range 0-1
- + '''
- return (self._r, self._g, self._b, self._a)
- def get_int(self):
- + '''
- + Returns color encoded as an int, in the form rgba
- + '''
- return int(self._a * 255) + (int(self._b * 255) << 8) + \
- (int(self._g * 255) << 16) + (int(self._r * 255) << 24)
- def get_gdk_color(self):
- +<<<<<<< HEAD
- + '''
- + Returns GDK standard color
- + '''
- +=======
- + '''
- + Returns GDK standard color
- + '''
- +>>>>>>> 8798b082aa242b7c5db1fcefc7fe444d8d17c7e8
- return Gdk.Color(int(self._r * 65535), int(self._g * 65535),
- int(self._b * 65535))
- def get_html(self):
- +<<<<<<< HEAD
- + '''
- + Returns string in the standard html Color format (#FFFFFF)
- + '''
- +=======
- + '''
- + Returns string in the standard html Color format (#FFFFFF)
- + '''
- +>>>>>>> 8798b082aa242b7c5db1fcefc7fe444d8d17c7e8
- return '#%02x%02x%02x' % (self._r * 255, self._g * 255, self._b * 255)
- def _html_to_rgb(self, html_color):
- - """ #RRGGBB -> (r, g, b) tuple (in float format) """
- + '''
- + Converts and returns (r, g, b) tuple in float format from standard HTML format (#FFFFFF).
- + Colors will be in range 0-1
- +
- + Args:
- + html_color (string): html string in the format #FFFFFF
- + '''
- html_color = html_color.strip()
- if html_color[0] == '#':
- @@ -93,6 +174,15 @@ class Color(object):
- return (r, g, b)
- def get_svg(self):
- + '''
- + Returns HTML formatted color, unless the color is completely transparent, in
- + which case returns "none"
- + '''
- +<<<<<<< HEAD
- +
- +=======
- +
- +>>>>>>> 8798b082aa242b7c5db1fcefc7fe444d8d17c7e8
- if self._a == 0.0:
- return 'none'
- else:
- @@ -100,6 +190,21 @@ class Color(object):
- def zoom(units):
- +<<<<<<< HEAD
- + '''
- + Returns size of units pixels at current zoom level
- +
- + Args:
- + units (int): size of item at full size
- + '''
- +=======
- + '''
- + Returns size of units pixels at current zoom level
- +
- + Args:
- + units (int): size of item at full size
- + '''
- +>>>>>>> 8798b082aa242b7c5db1fcefc7fe444d8d17c7e8
- return int(ZOOM_FACTOR * units)
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
- $ git add .
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
- $ git commit -m "Write docs for sugar3.graphics.style"
- [styledocs 60dcdd2] Write docs for sugar3.graphics.style
- 1 file changed, 60 insertions(+), 7 deletions(-)
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
- $ git push origin styledocs
- error: unable to read askpass response from 'C:/Users/Nick/AppData/Local/Programs/Git/mingw64/libexec/git-core/git-gui--askpass'
- Username for 'https://github.com':
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
- $ git push --force origin styledocs
- Counting objects: 6, done.
- Delta compression using up to 8 threads.
- Compressing objects: 100% (6/6), done.
- Writing objects: 100% (6/6), 1.26 KiB | 0 bytes/s, done.
- Total 6 (delta 4), reused 0 (delta 0)
- To https://github.com/ndefilippis/sugar-toolkit-gtk3.git
- + 948673d...60dcdd2 styledocs -> styledocs (forced update)
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
- $ git add .
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
- $ git commit -m "Write docs for sugar3.graphics.style"
- [styledocs bcab24e] Write docs for sugar3.graphics.style
- 1 file changed, 31 insertions(+), 31 deletions(-)
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
- $ git push --force origin styledocs
- Counting objects: 6, done.
- Delta compression using up to 8 threads.
- Compressing objects: 100% (6/6), done.
- Writing objects: 100% (6/6), 669 bytes | 0 bytes/s, done.
- Total 6 (delta 4), reused 0 (delta 0)
- To https://github.com/ndefilippis/sugar-toolkit-gtk3.git
- 60dcdd2..bcab24e styledocs -> styledocs
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
- Rebasing (1/1)i styledocs
- Successfully rebased and updated refs/heads/styledocs.
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
- $ git rebase -i styledocs HEAD
- Successfully rebased and updated detached HEAD.
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 ((bcab24e...))
- $ git rebase -i styledocs HEAD~2
- Successfully rebased and updated detached HEAD.
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 ((bcab24e...))
- $ git reset --soft HEAD^
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 ((60dcdd2...))
- $ git commit --amend
- [detached HEAD f0c0954] Write docs for sugar3.graphics.style
- Date: Sun Dec 27 19:48:14 2015 -0500
- 1 file changed, 60 insertions(+), 7 deletions(-)
- Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 ((f0c0954...))
- $ git push --force origin styledocs
- Everything up-to-date
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement