]> gitweb.factorcode.org Git - factor.git/commitdiff
ui.gadgets.tabbed: re-use toolbar theme to make nice tabs
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 3 May 2023 14:46:21 +0000 (07:46 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 3 May 2023 14:46:21 +0000 (07:46 -0700)
15 files changed:
basis/ui/gadgets/tabbed/tabbed.factor
basis/ui/theme/images/active-tab-left.tiff [deleted file]
basis/ui/theme/images/active-tab-left@2x.tiff [deleted file]
basis/ui/theme/images/active-tab-lip.tiff [deleted file]
basis/ui/theme/images/active-tab-lip@2x.tiff [deleted file]
basis/ui/theme/images/active-tab-middle.tiff [deleted file]
basis/ui/theme/images/active-tab-middle@2x.tiff [deleted file]
basis/ui/theme/images/active-tab-right.tiff [deleted file]
basis/ui/theme/images/active-tab-right@2x.tiff [deleted file]
basis/ui/theme/images/inactive-tab-left.tiff [deleted file]
basis/ui/theme/images/inactive-tab-left@2x.tiff [deleted file]
basis/ui/theme/images/inactive-tab-middle.tiff [deleted file]
basis/ui/theme/images/inactive-tab-middle@2x.tiff [deleted file]
basis/ui/theme/images/inactive-tab-right.tiff [deleted file]
basis/ui/theme/images/inactive-tab-right@2x.tiff [deleted file]

index 6c4928ad7f8c202a33b4ec3dafb15781db5e5e02..f28269687fa426ee5ee9321990c14c16297db075 100644 (file)
@@ -1,34 +1,16 @@
 ! Copyright (C) 2008, 2009 Slava Pestov.
 ! See https://factorcode.org/license.txt for BSD license.
-USING: accessors colors kernel models sequences ui.gadgets
-ui.gadgets.books ui.gadgets.borders ui.gadgets.buttons
-ui.gadgets.buttons.private ui.gadgets.icons ui.gadgets.packs
-ui.gadgets.tracks ui.pens ui.theme.images ;
+USING: accessors kernel models sequences ui.gadgets
+ui.gadgets.books ui.gadgets.borders ui.gadgets.buttons.private
+ui.gadgets.packs ui.gadgets.toolbar.private ui.gadgets.tracks ;
 IN: ui.gadgets.tabbed
 
 TUPLE: tabbed-gadget < track tabs book ;
 
 <PRIVATE
 
-: <lip> ( -- gadget )
-    "active-tab-lip" theme-image <icon> ;
-
-CONSTANT: button-background COLOR: FactorTan
-CONSTANT: active-tab-background COLOR: FactorDarkTan
-
-: <tab-pen> ( -- pen )
-    "inactive-tab" button-background f <border-button-state-pen> dup dup
-    "active-tab" active-tab-background f <border-button-state-pen> dup
-    <button-pen> ;
-
-: tab-theme ( gadget -- gadget )
-    horizontal >>orientation
-    <tab-pen> >>interior
-    dup dup interior>> pen-pref-dim >>min-dim
-    { 30 0 } >>size ; inline
-
 : <tab> ( value model label -- gadget )
-    <radio-control> tab-theme ;
+    <radio-control> toolbar-button-theme ;
 
 : add-tab/book ( tabbed child -- tabbed )
     [ dup book>> ] dip add-gadget drop ;
@@ -45,7 +27,6 @@ PRIVATE>
         <shelf> >>tabs
         horizontal <track>
             over tabs>> f track-add
-            <lip> 1 track-add
         f track-add
         dup model>> <empty-book> >>book
         dup book>> { 3 3 } <filled-border> 1 track-add ;
diff --git a/basis/ui/theme/images/active-tab-left.tiff b/basis/ui/theme/images/active-tab-left.tiff
deleted file mode 100644 (file)
index 9f2c296..0000000
Binary files a/basis/ui/theme/images/active-tab-left.tiff and /dev/null differ
diff --git a/basis/ui/theme/images/active-tab-left@2x.tiff b/basis/ui/theme/images/active-tab-left@2x.tiff
deleted file mode 100644 (file)
index c73e115..0000000
Binary files a/basis/ui/theme/images/active-tab-left@2x.tiff and /dev/null differ
diff --git a/basis/ui/theme/images/active-tab-lip.tiff b/basis/ui/theme/images/active-tab-lip.tiff
deleted file mode 100644 (file)
index 8ff803f..0000000
Binary files a/basis/ui/theme/images/active-tab-lip.tiff and /dev/null differ
diff --git a/basis/ui/theme/images/active-tab-lip@2x.tiff b/basis/ui/theme/images/active-tab-lip@2x.tiff
deleted file mode 100644 (file)
index ba352e3..0000000
Binary files a/basis/ui/theme/images/active-tab-lip@2x.tiff and /dev/null differ
diff --git a/basis/ui/theme/images/active-tab-middle.tiff b/basis/ui/theme/images/active-tab-middle.tiff
deleted file mode 100644 (file)
index 0f40e93..0000000
Binary files a/basis/ui/theme/images/active-tab-middle.tiff and /dev/null differ
diff --git a/basis/ui/theme/images/active-tab-middle@2x.tiff b/basis/ui/theme/images/active-tab-middle@2x.tiff
deleted file mode 100644 (file)
index 8e3a817..0000000
Binary files a/basis/ui/theme/images/active-tab-middle@2x.tiff and /dev/null differ
diff --git a/basis/ui/theme/images/active-tab-right.tiff b/basis/ui/theme/images/active-tab-right.tiff
deleted file mode 100644 (file)
index b56dc01..0000000
Binary files a/basis/ui/theme/images/active-tab-right.tiff and /dev/null differ
diff --git a/basis/ui/theme/images/active-tab-right@2x.tiff b/basis/ui/theme/images/active-tab-right@2x.tiff
deleted file mode 100644 (file)
index 01cfa1f..0000000
Binary files a/basis/ui/theme/images/active-tab-right@2x.tiff and /dev/null differ
diff --git a/basis/ui/theme/images/inactive-tab-left.tiff b/basis/ui/theme/images/inactive-tab-left.tiff
deleted file mode 100644 (file)
index d3ed0c7..0000000
Binary files a/basis/ui/theme/images/inactive-tab-left.tiff and /dev/null differ
diff --git a/basis/ui/theme/images/inactive-tab-left@2x.tiff b/basis/ui/theme/images/inactive-tab-left@2x.tiff
deleted file mode 100644 (file)
index ea699f5..0000000
Binary files a/basis/ui/theme/images/inactive-tab-left@2x.tiff and /dev/null differ
diff --git a/basis/ui/theme/images/inactive-tab-middle.tiff b/basis/ui/theme/images/inactive-tab-middle.tiff
deleted file mode 100644 (file)
index 3bdff5c..0000000
Binary files a/basis/ui/theme/images/inactive-tab-middle.tiff and /dev/null differ
diff --git a/basis/ui/theme/images/inactive-tab-middle@2x.tiff b/basis/ui/theme/images/inactive-tab-middle@2x.tiff
deleted file mode 100644 (file)
index 6d8de83..0000000
Binary files a/basis/ui/theme/images/inactive-tab-middle@2x.tiff and /dev/null differ
diff --git a/basis/ui/theme/images/inactive-tab-right.tiff b/basis/ui/theme/images/inactive-tab-right.tiff
deleted file mode 100644 (file)
index d6a332b..0000000
Binary files a/basis/ui/theme/images/inactive-tab-right.tiff and /dev/null differ
diff --git a/basis/ui/theme/images/inactive-tab-right@2x.tiff b/basis/ui/theme/images/inactive-tab-right@2x.tiff
deleted file mode 100644 (file)
index 76215e2..0000000
Binary files a/basis/ui/theme/images/inactive-tab-right@2x.tiff and /dev/null differ