⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ap_memo.lua

📁 高通BREW平台上的BUIW控件中的ScrollbarWidget控件代码及使用范例
💻 LUA
字号:
-- Scrollbar
BaseScrollbar = {
   Properties = {
      scrollfillcolor   = Color.rgbp(255, 255, 255, 50);
      scrollhandlecolor = Color.rgb(102, 102, 102);
      scrollcolor       = Color.none;
      scrollpad         = 1;  
      scrollhandlewidth = 2;
   };
};

-- StaticText
BaseStaticText = {
   Properties = {
      bgcolor        = Color.white;
      fgcolor        = Color.black;
   };
};

-- Title
BaseTitle = {
   Properties = {
      bgcolor     = Color.rgb(194, 194, 190);
      bordercolor = Color.none;
      borderwidth = 0;
      bottom_pad = 4;
      
      --fgcolor     = Color.rgb(51, 51, 51);
      flags       = Align.centered;
   };
};

-- Softkeys for normal forms
BaseSoftkeys = {
   Properties = {
      gradient_style = Gradient.none;
      bgcolor        = Color.rgb(194,194,190);
      gradient       = Color.none;
      
      borderwidth = 0;
      fgcolor     = Color.black;
      left_pad    = 5;
      right_pad   = 5;
      bottom_pad  = 1;
      top_pad     = 1;
   };
};

-- Softkeys for Dialogs
BaseDialogSoftkeys = {
   Properties = {
      gradient_style = Gradient.horz;
      bgcolor        = Color.rgb(248, 45, 2);
      gradient       = Color.rgb(196, 2, 2);
      
      fgcolor     = Color.white;
      left_pad    = 5;
      right_pad   = 5;
   };
};

-- Softkeys for Popup(Menus)
BasePopupSoftkeys = {
   Properties = {
      gradient_style = Gradient.horz;
      bgcolor        = Color.rgb(230, 230, 230);
      gradient       = Color.rgb(180, 180, 180);
      fgcolor        = Color.black;
   };
};
   
-- List
BaseList = {
   Properties = {
      bgcolor     = Color.none;
      borderwidth = 0;
   };
   
   Item = {
      Properties = {
	 active_borderwidth    = 1;
	 bordercolor           = Color.none;
	 selected_bgcolor      = Color.rgb(190, 236, 33);
	 selected_gradient     = Color.rgb(120, 149,  7);
	 gradient_style        = Gradient.horz;
	 bgcolor	       = Color.none;
	 selected_shadowoffset = 2;
	 selected_shadowcolor  = Color.rgb(51, 51, 51);
	 
      };
   };
   
   Scrollbar = clone(BaseScrollbar);
}; 

BaseDialog = {
   Properties = {
      --bgcolor = Color.white;
      borderwidth = 1;
      bordercolor = Color.black;
   };
   Softkeys = clone(BaseDialogSoftkeys);

   Title = clone(BaseTitle);
   
};

-- PopupMenu
BasePopupMenu = {
   Softkeys = clone(BasePopupSoftkeys);
   List = {
      Properties = {
	 borderwidth = 0;
      };

   Item = {
	 Properties = {
	    fgcolor = Color.black;

	    borderwidth = 1;
	    bordercolor = Color.rgb(255, 255, 255, 10);

	    gradient_style     = Gradient.horz;
	    inactive_bgcolor   = Color.rgbp(230, 230, 230, 10);
 	    inactive_gradient  = Color.rgb(180, 180, 180);

            selected_bgcolor   = Color.rgb(160, 140, 190);
 	    selected_gradient  = Color.rgb(194, 194, 190);

	    selected_shadowoffset = 2;
	    selected_shadowcolor  = Color.rgb(51, 51, 51);
	 };
      };
   };
};

DefaultDialog = {
   Dialog = clone(BaseDialog);
};

--
-- Actual theme entries 
--
Theme.InfoDialog  = clone(DefaultDialog);
Theme.ErrorDialog = clone(DefaultDialog);
Theme.WarnDialog  = clone(DefaultDialog);
--Theme.WarnDialog.Background = Image.from("blueswirl.bmp");--modified by 曾念荣
--Theme.WarnDialog.Background = clone(DefaultDialog);

-- Default theme for a basic (list based) form
Default = {
   Title      = clone(BaseTitle);
   Softkeys   = clone(BaseSoftkeys);
   List       = clone(BaseList);
--   Background = Image.from("blueswirl.bmp");--modified by 曾念荣
   Background = clone(BaseTitle);;
   Dialog     = clone(BaseDialog);   
   PopupMenu  = clone(BasePopupMenu);
   ProgressDialog = clone(DefaultDialog);
};

--ProgressDialog.Dialog.Properties.fgcolor = Color.rgba(0, 0, 255, 255);


-- The system theme is used by forms
Theme.System   = clone(Default);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -