From 947c13ebf319b6154d9fca4e727ced57d1a84ec7 Mon Sep 17 00:00:00 2001 From: "mcafee%netscape.com" Date: Fri, 17 Sep 1999 06:30:56 +0000 Subject: [PATCH] Adding colorpicker --- suite/common/pref/pref-colors.xul | 83 ++++++++++++++++--- .../resources/content/pref-colors.xul | 83 ++++++++++++++++--- 2 files changed, 142 insertions(+), 24 deletions(-) diff --git a/suite/common/pref/pref-colors.xul b/suite/common/pref/pref-colors.xul index 08800aa69bb3..1ca331c43d95 100644 --- a/suite/common/pref/pref-colors.xul +++ b/suite/common/pref/pref-colors.xul @@ -30,6 +30,47 @@ + + function setColorWell(menu) + { + // Debug tree walking. + dump("\n"); + + dump("parent: "); + dump(menu.id); + dump("\n"); + + dump("child 1: "); + dump(menu.firstChild.id); + dump("\n"); + + dump("child 2: "); + dump(menu.firstChild.nextSibling.id); + dump("\n"); + + dump("child 3: "); + dump(menu.firstChild.nextSibling.nextSibling.id); + dump("\n"); + + dump("child 3's child 1: "); + dump(menu.firstChild.nextSibling.nextSibling.firstChild.id); + dump("\n"); + + + dump("\n"); + dump("\n"); + + // Find the colorWell and colorPicker in the hierarchy. + var colorWell = menu.firstChild.nextSibling; + var colorPicker = menu.firstChild.nextSibling.nextSibling.firstChild; + + // Extract color from colorPicker and assign to colorWell. + var color = colorPicker.getAttribute('color'); + colorWell.style.backgroundColor = color; + } + + + @@ -47,14 +88,24 @@ - &text; - - + + + + + + + + - &background; - - + + + + + + + + &links; - &unvisit; - - + + + + + + + - &visit; - - + + + + + + + diff --git a/xpfe/components/prefwindow/resources/content/pref-colors.xul b/xpfe/components/prefwindow/resources/content/pref-colors.xul index 08800aa69bb3..1ca331c43d95 100644 --- a/xpfe/components/prefwindow/resources/content/pref-colors.xul +++ b/xpfe/components/prefwindow/resources/content/pref-colors.xul @@ -30,6 +30,47 @@ + + function setColorWell(menu) + { + // Debug tree walking. + dump("\n"); + + dump("parent: "); + dump(menu.id); + dump("\n"); + + dump("child 1: "); + dump(menu.firstChild.id); + dump("\n"); + + dump("child 2: "); + dump(menu.firstChild.nextSibling.id); + dump("\n"); + + dump("child 3: "); + dump(menu.firstChild.nextSibling.nextSibling.id); + dump("\n"); + + dump("child 3's child 1: "); + dump(menu.firstChild.nextSibling.nextSibling.firstChild.id); + dump("\n"); + + + dump("\n"); + dump("\n"); + + // Find the colorWell and colorPicker in the hierarchy. + var colorWell = menu.firstChild.nextSibling; + var colorPicker = menu.firstChild.nextSibling.nextSibling.firstChild; + + // Extract color from colorPicker and assign to colorWell. + var color = colorPicker.getAttribute('color'); + colorWell.style.backgroundColor = color; + } + + + @@ -47,14 +88,24 @@ - &text; - - + + + + + + + + - &background; - - + + + + + + + + &links; - &unvisit; - - + + + + + + + - &visit; - - + + + + + + +